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

Reduce CSRF calls and support refreshing on SSR side #91

Merged
merged 3 commits into from
May 12, 2024

Conversation

manchenkoff
Copy link
Owner

@manchenkoff manchenkoff commented May 12, 2024

Is your PR related to a specific issue/feature? Please describe and mention issues.

Closes #88 with a change that checks current cookies and requests a new CSRF token only when it is not set. Also, in order to reduce calls to API, SSR cookies propagation was configured. As a result, when the module tries to initialize the user, the XSRF token cookie will be set on the client side as well.

Checklist:

  • Code style and linters are passing
  • Backwards compatibility is maintained
  • Requires documentation to be updated

@manchenkoff manchenkoff self-assigned this May 12, 2024
@manchenkoff manchenkoff merged commit 2993c9e into main May 12, 2024
1 check passed
@manchenkoff manchenkoff deleted the 88-reduce-csrf-calls branch May 12, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] useSanctumClient send an additional request to the /sanctum/csrf-cookie route on each request
1 participant