Open Vijayabhaskar96 opened 4 months ago
Hello @zoey-kaiser, is there anything we can do to help get this fix shipped ?
Thanks !
Hi @Geekimo π
I would like to get a review by @phoenix-ru in before merging this PR π
@zoey-kaiser Thanks for your reply βΊοΈ
Any news on this fix or can we help? I use a local provider and having auth work with ssg would be highly appreciated :-)
Hello @zoey-kaiser and @phoenix-ru, Sorry to bother you about this fix, but I'm currently holding a deployment to production due to this bug. I'd really love to help you out to get this released.
Kind regards.
Hi @Vijayabhaskar96 π
I wanted to push this PR into the next release, but sadly the authjs tests are failing. We will finalize the PRs for the release tomorrow. For the case that we are not able to include it yet, you can directly install your PR as an npm package using:
pnpm add https://pkg.pr.new/@sidebase/nuxt-auth@785
Hello @zoey-kaiser, will this PR be included in the next release (if yes, when is it planned ?) Regards
Is there a specific reason why this wasn't included in the 0.9.4 release?
Previous PR: #712
π Linked issue
551
This issue occurs because
data
(data fromgetSession()
) is not stored in the browser, which is not a problem in SSR with server because the server takes care of it, but on a statically generated website, thisdata
is lost along withrawToken
even if the token is stored in the browser cookies if you refresh the webpage.β Type of change
π Description
This PR stores the retrieved data from
getSession()
and stores it in the browser cookieauth:sessionCookie
and reloads thedata
andrawToken
back on the client side if they'reundefined
. This PR fixes the data issue, but you still need to set theprerender:false
for middleware protected routes in routeRules so that client-side middleware is forced to run and load the states.π Checklist