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
+361-4Lines changed: 361 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,366 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Breaking changes
11
11
12
+
- Added support for CDI version `2.21`
13
+
<!-- FIXME -->
14
+
- Dropped support for CDI version `2.8` - `2.18`
15
+
- Changed the interface and configuration of the Session recipe, see below for details. If you do not use the Session recipe directly and do not provide custom configuration, then no migration is necessary.
16
+
-`get_access_token_payload` will now return standard (`sub`, `iat`, `exp`) claims and some SuperTokens specific claims along the user defined ones in `get_access_token_payload`.
17
+
- Some claim names are now prohibited in the root level of the access token payload:
18
+
- They are: `sub`, `iat`, `exp`, `sessionHandle`, `parentRefreshTokenHash1`, `refreshTokenHash1`, `antiCsrfToken`
19
+
- If you used these in the root level of the access token payload, then you'll need to migrate your sessions or they will be logged out during the next refresh
20
+
- These props should be renamed (e.g., by adding a prefix) or moved inside an object in the access token payload
21
+
- You can migrate these sessions by updating their payload to match your new structure, by calling `merge_into_access_token_payload`
22
+
- New access tokens are valid JWTs now
23
+
- They can be used directly (i.e.: by calling `get_access_token` on the session) if you need a JWT
24
+
- The `jwt` prop in the access token payload is removed
25
+
- Changed the Session recipe interface - `create_new_session`, `get_session` and `refresh_session` overrides now do not take response and request and return status instead of throwing
26
+
27
+
### Configuration changes
28
+
29
+
- Added `use_dynamic_access_token_signing_key` (defaults to `True`) option to the Session recipe config
30
+
- Added `expose_access_token_to_frontend_in_cookie_based_auth` (defaults to `False`) option to the Session recipe config
31
+
- JWT and OpenId related configuration has been removed from the Session recipe config. If necessary, they can be added by initializing the OpenId recipe before the Session recipe.
32
+
33
+
34
+
### Interface changes
35
+
12
36
- Renamed `get_session_data` to `get_session_data_from_database` to clarity that it always hits the DB
13
37
- Renamed `update_session_data` to `update_session_data_in_database`
14
38
- Renamed `session_data` to `session_data_in_database` in `SessionInformation` and the input to `create_new_session`
39
+
- Added new `check_database` param to `verify_session` and `get_session`
40
+
- Removed `status` from `jwks_get` output (function & API)
41
+
- Added new optional `use_static_signing_key` param to `createJWT`
42
+
- Removed deprecated `update_access_token_payload` and `regenerate_access_token` from the Session recipe interface
43
+
- Removed `get_access_token_lifetime_ms` and `get_refresh_token_lifetime_ms` functions
44
+
45
+
46
+
## Changes
47
+
48
+
- The Session recipe now always initializes the OpenID recipe if it hasn't been initialized.
49
+
- Refactored how access token validation is done
50
+
- Removed the handshake call to improve start-up times
51
+
- Added support for new access token version
52
+
53
+
### Added
54
+
55
+
- Added `create_new_session_without_request_response`, `get_session_without_request_response`, `refresh_session_without_request_response` to the Session recipe.
56
+
- Added `get_all_session_tokens_dangerously` to session objects (`SessionContainer`)
57
+
- Added `attach_to_request_response` to session objects (`SessionContainer`)
58
+
59
+
### Migration
60
+
61
+
#### If self-hosting core
62
+
63
+
1. You need to update the core version
64
+
2. There are manual migration steps needed. Check out the core changelogs for more details.
65
+
66
+
#### If you used the jwt feature of the session recipe
67
+
68
+
1. Add `expose_access_token_to_frontend_in_cookie_based_auth=true` to the Session recipe config on the backend if you need to access the JWT on the frontend.
69
+
2. On the frontend where you accessed the JWT before by: `(await Session.getAccessTokenPayloadSecurely()).jwt` update to:
# This branch is only required if there are valid access tokens created before the update
92
+
# It can be removed after the validity period ends
93
+
jwt = accessTokenPayload.jwt
94
+
```
95
+
96
+
#### If you used to set an issuer in the session recipe `jwt` configuration
97
+
98
+
- You can add an issuer claim to access tokens by overriding the `create_new_session` function in the session recipe init.
99
+
- Check out https://supertokens.com/docs/passwordless/common-customizations/sessions/claims/access-token-payload#during-session-creation for more information
100
+
- You can add an issuer claim to JWTs created by the JWT recipe by passing the `iss` claim as part of the payload.
101
+
- You can set the OpenId discovery configuration as follows:
0 commit comments