Skip to content

Commit 3b24f61

Browse files
Merge pull request #335 from supertokens/apple-fix
fix: apple redirect
2 parents 8321af0 + 1a1a5cd commit 3b24f61

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

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

88
## [unreleased]
99

10+
## [0.13.1] - 2023-08-11
11+
12+
- Fixes apple redirect
13+
1014
## [0.13.0] - 2023-08-07
1115

1216
### Added

recipe/thirdparty/api/appleRedirect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func AppleRedirectHandler(apiImplementation tpmodels.APIInterface, options tpmod
2626
return nil
2727
}
2828

29-
err := options.Req.ParseMultipartForm(0)
29+
err := options.Req.ParseForm()
3030
if err != nil {
3131
return err
3232
}

recipe/thirdparty/api/implementation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func MakeAPIImplementation() tpmodels.APIInterface {
118118

119119
appleRedirectHandlerPOST := func(formPostInfoFromProvider map[string]interface{}, options tpmodels.APIOptions, userContext supertokens.UserContext) error {
120120
state := formPostInfoFromProvider["state"].(string)
121-
stateBytes, err := base64.RawStdEncoding.DecodeString(state)
121+
stateBytes, err := base64.StdEncoding.DecodeString(state)
122122

123123
if err != nil {
124124
return err
@@ -130,7 +130,7 @@ func MakeAPIImplementation() tpmodels.APIInterface {
130130
return err
131131
}
132132

133-
redirectURL := stateObj["redirectURI"].(string)
133+
redirectURL := stateObj["frontendRedirectURI"].(string)
134134
parsedRedirectURL, err := url.Parse(redirectURL)
135135
if err != nil {
136136
return err

supertokens/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121
)
2222

2323
// VERSION current version of the lib
24-
const VERSION = "0.13.0"
24+
const VERSION = "0.13.1"
2525

2626
var (
2727
cdiSupported = []string{"3.0"}

0 commit comments

Comments
 (0)