You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to login using a popup window so I don't have to actually reload the page and lose state etc, just like the Auth0 spa package used to work.
I've got it working using router.replace(router.asPath) but only for the server side props, it returns my session etc but when I try to use the useSession hook I just keep getting an empty session object back, even when I try to pass the values from the SSP into the initialPublicData it still returns an empty session object.
login using a popup setting the cookies on our domain
refresh the page without reloading using router.replace(router.asPath)
useSession returns an empty session object with { userId: undefined, loading: false } and gSSP does get a proper session object with the logged in user
woondossier
changed the title
useSession is not updating after refreshing the page
useSession is not updating after using router.replace(router.asPath)
Aug 14, 2023
@siddhsuresh
I've made a clean project with auth setup and it worked and started adding parts of our login structure till it breaks and it seems to be caused by the third party login part of our setup.
As soon as I use the passport/next-auth route instead of the default auth login page it breaks the useSession() from updating to the current user while all the cookies etc are being set.
I've made a hardcoded auth0 passport strategy on a empty new test tenant with a user that can also be use to login using the default auth way.
The only thing that needs to be configured is the redis server which is located in src/redis.ts
What is the problem?
I'm trying to login using a popup window so I don't have to actually reload the page and lose state etc, just like the Auth0 spa package used to work.
I've got it working using router.replace(router.asPath) but only for the server side props, it returns my session etc but when I try to use the useSession hook I just keep getting an empty session object back, even when I try to pass the values from the SSP into the initialPublicData it still returns an empty session object.
Paste all your error logs here:
Paste all relevant code snippets here:
What are detailed steps to reproduce this?
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
No response
The text was updated successfully, but these errors were encountered: