I need localized redirects on login, so I have the following config:
In nuxt.config
redirect: {
…
home: '/login-landing'
},
in a plugin:
app.$auth.onRedirect((to, from) => {
if (to === '/login-landing') {
// return localized path
}
return to;
});
This works great for normal logins, but is not triggered for an oAuth-Login via google.
Sorry I can not provide an example repo, but this needs a Google-oAuth setup to try it out.
onRedirect should be triggered
onRedirect is not triggered
Same problem here
I can also confirm that this is an issue when using the Google provider.
When $auth triggers _handleCallback, it is triggered before the plugins defined in auth inside the nuxt.config are instanciated.
Therefore, when the login callback redirect is triggered, there is nothing populated inside _redirectListeners.
True for version 4.8.1.
any updates on this?....
Most helpful comment
any updates on this?....