You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+159Lines changed: 159 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,165 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [unreleased]
8
8
9
+
### Changes
10
+
11
+
- Made the `email` parameter option in `unverify_email`, `revoke_email_verification_tokens`, `is_email_verified`, `verify_email_using_token`, `create_email_verification_token` of the `EmailVerification` recipe.
12
+
13
+
### Added
14
+
15
+
- Added support for session claims with related interfaces and classes.
- Added `INVALID_CLAIMS` (`InvalidClaimError`) to `SessionErrors`.
18
+
- Added `invalid_claim_status_code` optional config to set the status code of InvalidClaim errors.
19
+
- Added `override_global_claim_validators` as param of `get_session` and `verify_session`.
20
+
- Added `merge_into_access_token_payload` to the Session recipe and session objects which should be preferred to the now deprecated `update_access_token_payload`.
21
+
- Added `EmailVerificationClaim`, `UserRoleClaim` and `PermissionClaim`. These claims are now added to the access token payload by default by their respective recipes.
22
+
- Added `assert_claims`, `validate_claims_for_session_handle`, `validate_claims_in_jwt_payload` to the Session recipe to support validation of the newly added claims.
23
+
- Added `fetch_and_set_claim`, `get_claim_value`, `set_claim_value` and `remove_claim` to the Session recipe to manage claims.
24
+
- Added `assert_claims`, `fetch_and_set_claim`, `get_claim_value`, `set_claim_value` and `remove_claim` to session objects to manage claims.
25
+
- Added session to the input of `generate_email_verify_token_post`, `verify_email_post`, `is_email_verified_get`.
26
+
- Adds default userContext for verifySession calls that contains the request object.
27
+
28
+
### Breaking Changes
29
+
- Changed `sign_in_up` third party recipe function to accept just the email as `str` (removed `email_verified: bool`).
30
+
- The frontend SDK should be updated to a version supporting session claims!
31
+
- supertokens-auth-react: >= 0.25.0
32
+
- supertokens-web-js: >= 0.2.0
33
+
-`EmailVerification` recipe is now not initialized as part of auth recipes, it should be added to the `recipe_list` directly instead using `emailverification.init()`.
34
+
- Email verification related overrides (`email_verification_feature` attr of `override`) moved from auth recipes into the `EmailVerification` recipe config.
35
+
- Email verification related configs (`email_verification_feature` attr) moved from auth recipes into the `EmailVerification` config object root.
36
+
- ThirdParty recipe no longer takes `email_delivery` config. use `emailverification` recipe's `email_delivery` instead.
37
+
- Moved email verification related configs from the `email_delivery` config of auth recipes into a separate `EmailVerification` email delivery config.
38
+
- Updated return type of `get_email_for_user_id` in the `EmailVerification` recipe config. It should now return an object with status.
39
+
- Removed `get_reset_password_url`, `get_email_verification_url`, `get_link_domain_and_path`. Changing these urls can be done in the email delivery configs instead.
40
+
- Removed `unverify_email`, `revoke_email_verification_tokens`, `is_email_verified`, `verify_email_using_token` and `create_email_verification_token` from auth recipes. These should be called on the `EmailVerification` recipe instead.
41
+
- Changed function signature for email verification APIs to accept a session as an input.
42
+
- Changed Session API interface functions:
43
+
-`refresh_post` now returns a Session container object.
44
+
-`sign_out_post` now takes in an optional session object as a parameter.
45
+
46
+
### Migration
47
+
Before:
48
+
```python
49
+
from supertokens_python import init, SupertokensConfig, InputAppInfo
50
+
from supertokens_python.recipe import emailpassword
51
+
from supertokens_python.recipe.emailverification.utils import OverrideConfig
52
+
53
+
init(
54
+
supertokens_config=SupertokensConfig("..."),
55
+
app_info=InputAppInfo("..."),
56
+
framework="...",
57
+
recipe_list=[
58
+
emailpassword.init(
59
+
# these options should be moved into the EmailVerification config:
The `UserRoles` recipe now adds role and permission information into the access token payload by default. If you are already doing this manually, this will result in duplicate data in the access token.
163
+
164
+
- You can disable this behaviour by setting `skip_adding_roles_to_access_token` and `skip_adding_permissions_to_access_token` to true in the recipe init.
165
+
- Check how to use the new claims in the updated guide: https://supertokens.com/docs/userroles/protecting-routes
166
+
167
+
9
168
## [0.10.4] - 2022-08-30
10
169
## Features:
11
170
- Add support for User ID Mapping using `create_user_id_mapping`, `get_user_id_mapping`, `delete_user_id_mapping`, `update_or_delete_user_id_mapping` functions
0 commit comments