-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
Check if user logged in on unprotected page when logging out to that page #1489
Comments
Sounds like a Nuxt question? I don't use Nuxt so I don't think I help much either |
@pilcrowOnPaper, nope - it is a lucia question. Why is user.value still true after logging out before completion of redirect to login page... |
Because there's nothing updating the value of |
you rock - just to understand, after redirect it auto sets to null?
…On Fri, Mar 15, 2024 at 1:20 AM pilcrow ***@***.***> wrote:
Because there's nothing updating the value of user.value? Just set the
value to null after making a fetch request if you need it before the
redirect
—
Reply to this email directly, view it on GitHub
<#1489 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATTEVLK6HMVCVXKH7OYH3Q3YYIWC7AVCNFSM6AAAAABEW7M7WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGYZTGNBZGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
When you redirect, the middleware for the destination page runs which fetches the latest user data |
Package
lucia
Describe the bug
For the login page of my Nuxt 3 app if user is logged in I want to redirect the user to dashboard page automatically. You can't use authenticatedUser() on the login page since it is not a protected page, and when using user to do a simple test like this both in middleware or on login page itself when signing out - it stays on dashboard page until complete refresh?
Thanks for the lib and goold luck with uni
The text was updated successfully, but these errors were encountered: