Skip to content

Commit 528c137

Browse files
merge with 0.10
2 parents f2bb97a + f2bd8dc commit 528c137

File tree

83 files changed

+4532
-1122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+4532
-1122
lines changed

.circleci/setupAndTestWithFrontend.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ cd ../project/test/frontendIntegration/
5252
go run main.go &
5353
go run main.go 8082 &
5454
cd ../../../supertokens-website/test/server
55-
npm i -d
5655
npm i git+https://github.com:supertokens/supertokens-node.git#$3
56+
npm i
5757
cd ../../
5858
npm i -d
5959
SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root npm test

CHANGELOG.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,64 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10+
## [0.10.1] - 2023-02-06
11+
12+
- Email template updates
13+
14+
## [0.10.0] - 2023-02-02
15+
16+
### Fixes
1017
- Fixes issue with go-fiber example, where updating accessTokenPayload from user defined endpoint doesn't reflect in the response cookies.
1118

12-
## [0.9.15] - 2023-02-06
19+
### Added
20+
- Added support for authorizing requests using the `Authorization` header instead of cookies
21+
- Optional `GetTokenTransferMethod` config is Session recipe input, which determines the token transfer method.
22+
- Check out https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/sessions/token-transfer-method for more information
23+
24+
### Removed
25+
- ID Refresh token is removed from the SDK
1326

14-
- Email template updates
27+
### Breaking changes
28+
- The frontend SDK should be updated to a version supporting the header-based sessions!
29+
- supertokens-auth-react: >= 0.31.0
30+
- supertokens-web-js: >= 0.5.0
31+
- supertokens-website: >= 16.0.0
32+
- supertokens-react-native: >= 4.0.0
33+
- supertokens-ios >= 0.2.0
34+
- supertokens-android >= 0.3.0
35+
- supertokens-flutter >= 0.1.0
36+
- `CreateNewSession` now requires passing the request as well as the response.
37+
- This only requires a change if you manually created sessions (e.g.: during testing)
38+
- Check the migration example below
39+
- `CreateNewSessionWithContext` and `CreateNewSession` in the session recipe accepts new
40+
- Only supporting FDI 1.16
41+
parameter `req` of type `*http.Request`
42+
43+
### Migration
44+
45+
Before:
46+
47+
```go
48+
func httpHandler(w http.ResponseWriter, r *http.Request,) {
49+
sessionContainer, err := session.CreateNewSession(w, "userId", map[string]interface{}{}, map[string]interface{}{})
50+
if err != nil {
51+
// handle error
52+
}
53+
// ...
54+
}
55+
```
56+
57+
After:
58+
59+
```go
60+
func httpHandler(w http.ResponseWriter, r *http.Request,) {
61+
sessionContainer, err := session.CreateNewSession(r, w, "userId", map[string]interface{}{}, map[string]interface{}{})
62+
if err != nil {
63+
// handle error
64+
}
65+
// ...
66+
}
67+
```
1568

1669
## [0.9.14] - 2022-12-26
1770

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"_comment": "contains a list of frontend-driver interfaces branch names that this core supports",
33
"versions": [
4-
"1.15"
4+
"1.16"
55
]
66
}

recipe/emailpassword/api/implementation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func MakeAPIImplementation() epmodels.APIInterface {
145145
}
146146

147147
user := response.OK.User
148-
session, err := session.CreateNewSessionWithContext(options.Res, user.ID, map[string]interface{}{}, map[string]interface{}{}, userContext)
148+
session, err := session.CreateNewSessionWithContext(options.Req, options.Res, user.ID, map[string]interface{}{}, map[string]interface{}{}, userContext)
149149
if err != nil {
150150
return epmodels.SignInPOSTResponse{}, err
151151
}
@@ -184,7 +184,7 @@ func MakeAPIImplementation() epmodels.APIInterface {
184184

185185
user := response.OK.User
186186

187-
session, err := session.CreateNewSessionWithContext(options.Res, user.ID, map[string]interface{}{}, map[string]interface{}{}, userContext)
187+
session, err := session.CreateNewSessionWithContext(options.Req, options.Res, user.ID, map[string]interface{}{}, map[string]interface{}{}, userContext)
188188
if err != nil {
189189
return epmodels.SignUpPOSTResponse{}, err
190190
}

0 commit comments

Comments
 (0)