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
After a successful login, I'm redirected to / as expected and defined in home, but suppose that I'm in a route like /keys and my token expired, which means that I'll be redirected to /login as expected, but I expect that after another successful login, this time I'll be redirected to /keys.
I was doing this (@nuxtjs/auth v4) by myself using a plugin like this one, which looks pretty much the same as here in this core function.
So I'm wondering if I can do that without this plugin using just the new (@nuxtjs/auth-next v5)?
I removed the plugin, set many properties (rewriteRedirects, fullPath), but I couldn't find a way to it to work.
The text was updated successfully, but these errors were encountered:
Ok, as usual after 1 hour I figured out that the only thing I need to do was to comment/remove home: '/' in redirect.
home: User will be redirected to this path after login. (rewriteRedirects will rewrite this path)
It was not clear to me that if I had home set in configuration it will disable the rewriteRedirects to work properly. As English is not my first language, maybe it was my fault to understand, or maybe the documentation is not clear enough about that, and so we need to improve it.
bmulholland
changed the title
[@nuxtjs/auth-next] login with redirect to previous route.
Configuration for home redirect confusing: forces redirect to that page
Jan 20, 2022
I'm using local auth strategy with Bearer token.
After a successful login, I'm redirected to
/
as expected and defined inhome
, but suppose that I'm in a route like/keys
and my token expired, which means that I'll be redirected to/login
as expected, but I expect that after another successful login, this time I'll be redirected to/keys
.I was doing this
(@nuxtjs/auth v4)
by myself using a plugin like this one, which looks pretty much the same as here in this core function.So I'm wondering if I can do that without this plugin using just the new
(@nuxtjs/auth-next v5)
?I removed the plugin, set many properties (rewriteRedirects, fullPath), but I couldn't find a way to it to work.
The text was updated successfully, but these errors were encountered: