-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expire auth token and PKCE cookies (#994)
Get the expiration date from the auth token and set the cookie to expire when the token itself expires. PKCE sessions are slightly different. In some contexts, we do not start the session itself until a middle point in the flow, like with email verification, the session starts on the auth server once the verification token is sent to the server, not when the email is sent by the server to the email recipient. Since the verification token has a lifespan of 24 hours at the moment, the expiration is longer than the PKCE session lifespan which is currently 10 minutes. So instead of trying to chase the smallest window of time we can, we set it to a reasonable level: one week after which the PKCE verifier cookie is expired, requiring whatever flow has begun to be retried.
- Loading branch information
1 parent
a108c80
commit 385949c
Showing
6 changed files
with
121 additions
and
256 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
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 |
---|---|---|
|
@@ -36,6 +36,6 @@ | |
"react": "^18.2.0" | ||
}, | ||
"dependencies": { | ||
"@edgedb/auth-core": "0.2.0" | ||
"@edgedb/auth-core": "0.2.1" | ||
} | ||
} |
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
Oops, something went wrong.