After logging in and being redirected the session is null from useSession hook #10792
Unanswered
Dave-Patsy
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using a Next.js app with an authentication provider from Auth.js V5 in the root layout for and passing auth() session to it. After a successful login, the user is redirected to the settings page. However, the session appears as null in the client component on the settings page. Shouldn't the login update the session and make it accessible to all components? Why isn't the session refreshing properly on login?
Repo: https://github.com/Dave-Patsy/t3-portfolio-A
here are the callbacks
settings page
here are the settings console logs as it renders
session in settings client component null
page-e29e28e7180f1a28.js:1 useCurrentUser in settings client component undefined
page-e29e28e7180f1a28.js:1 session in settings client component null
page-e29e28e7180f1a28.js:1 useCurrentUser in settings client component undefined
page-e29e28e7180f1a28.js:1 session in settings client component null
page-e29e28e7180f1a28.js:1 useCurrentUser in settings client component undefined
page-e29e28e7180f1a28.js:1 session in settings client component {user: {…}, expires: '2024-05-31T22:10:25.730Z'}
Beta Was this translation helpful? Give feedback.
All reactions