-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(user): upgrade supertokens node to 13.6.0 (#419)
* chore(deps): update supertokens-node package to 13.6.0 * feat(user): set default token transfer method to cookie
- Loading branch information
1 parent
dd9708d
commit c91034a
Showing
5 changed files
with
82 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
auto-install-peers = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
packages/user/src/supertokens/recipes/config/sessionRecipeConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import type { TypeInput as SessionRecipeConfig } from "supertokens-node/recipe/session/types"; | ||
|
||
const getSessionRecipeConfig = (): SessionRecipeConfig => { | ||
return {}; | ||
return { | ||
getTokenTransferMethod: (input) => { | ||
return input.req.getHeaderValue("st-auth-mode") === "header" | ||
? "header" | ||
: "cookie"; | ||
}, | ||
}; | ||
}; | ||
|
||
export default getSessionRecipeConfig; |
Oops, something went wrong.