Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix auth issue where session token and publicData cookie were updated unnecessarily, leading to potential user logout #3556

Merged
merged 4 commits into from
Jul 18, 2022

Conversation

flybayer
Copy link
Member

What are the changes and their implications?

  • 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.

@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2022

🦋 Changeset detected

Latest commit: 9f6def5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@blitzjs/auth Patch
blitz Patch
@blitzjs/rpc Patch
@blitzjs/next Patch
@blitzjs/codemod Patch
@blitzjs/config Patch
@blitzjs/generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@itsdillon itsdillon merged commit 8bcb471 into main Jul 18, 2022
@itsdillon itsdillon deleted the bb-more-auth-fix branch July 18, 2022 22:19
StringKe added a commit to StringKe/blitz that referenced this pull request Jul 25, 2022
* 'main' of github.com:StringKe/blitz:
  Version Packages (alpha) (blitz-js#3561)
  Don't throw error on a missing app/api folder when running codemod (blitz-js#3568)
  Update CODEOWNERS
  fix blitz not loading custom server (blitz-js#3564)
  Fix auth issue where session token and publicData cookie were updated unnecessarily, leading to potential user logout (blitz-js#3556)
  Fix a long-standing issue with occasional blitz auth flakiness (blitz-js#3554)
  Fix queryClient not working the same in SSP and SP (blitz-js#3563)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants