-
Notifications
You must be signed in to change notification settings - Fork 386
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
Using Auth0 methods on a Server Action causes a flickering on the NextJS Client #1645
Comments
I'm seeing the same, if i remove the auth0 code the response from the server action is tiny, with the auth0 code it returns a much larger response. almost looks like it's returning the entire page. |
Same issue here, I digged a bit and it is caused by Next.js invalidating path whenever a cookie is set, which auth0 basically do whenever you call getSession I guess to refresh the session cookie Next.js related issue here: vercel/next.js#50163 On my side it's making our form unusable as it is, forces us to us API/fetch instead of actions and will probably make me pull out of Auth0 in the long run :( |
it seems that using getSession() inside of a server action causes a page refresh. I think this is because getSession() sets a cookie every time it’s called. |
Same issue here. |
Any plans on fixing this? |
Checklist
Description
We want to call a third party API through a server on a
use client
component and we need to send the Auth0 access token to that API.When we call to
getSession()
orgetAccessToken()
inside that server action all the client have a flickering since the entire document along with the CSS and the fonts we use are reloaded again. If we don't use anything from Auth0 on that server action we don't have that flickeringScreen.Recording.2024-01-24.at.00.09.39.mov
Reproduction
Additional context
No response
nextjs-auth0 version
3.5.0
Next.js version
14.0.4
Node.js version
18.x
The text was updated successfully, but these errors were encountered: