-
-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix auth issue where session token and publicData cookie were updated…
… unnecessarily, leading to potential user logout (#3556) * fix auth issue where session token and public data token was updated unnecessarily
- Loading branch information
Showing
2 changed files
with
12 additions
and
17 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,9 @@ | ||
--- | ||
"@blitzjs/auth": patch | ||
"blitz": patch | ||
--- | ||
|
||
Fix auth issue where session token and publicData cookie were updated unnecessarily, leading to potential user logout | ||
|
||
- Previously, we were updating the session token each time public data changed. This is not needed, and it would cause race condition bugs where a user could be unexpectedly logged out because a request already in flight would not match the new session token. | ||
- Previously, we were updating the publicData cookie even when it hadn't changed. This may reduce unnecessary re-renders on the client. |
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