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

Next.js app dir compatibility #26

Merged
merged 6 commits into from
Nov 17, 2023
Merged

Next.js app dir compatibility #26

merged 6 commits into from
Nov 17, 2023

Conversation

typeofweb
Copy link
Contributor

@typeofweb typeofweb commented Nov 16, 2023

Fixes #14

Features

  • Default in-memory storage for access token can be now overridden by providing the accessTokenStorage argument in SaleorAuthClient
    • This enables support for server-side auth flows where access token is stored in cookies
  • New export path is added: @saleor/auth-sdk/next/server that exports getNextServerCookiesStorage meant for best compatibility with Next.js 13+ App Router. See this example for details.

BREAKING CHANGES

  • storage argument in SaleorAuthClient has been renamed to refreshTokenStorage

@typeofweb typeofweb marked this pull request as ready for review November 17, 2023 09:09
@zaiste
Copy link
Contributor

zaiste commented Nov 17, 2023

@mmiszy rocks!

@zaiste zaiste merged commit 7e11da7 into main Nov 17, 2023
1 check passed
@zaiste zaiste deleted the next-appdir branch November 17, 2023 09:42
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.

Adjust Auth SDK for Next.js 14
2 participants