Redirect to previous on unguarded routes #1570
Replies: 3 comments
-
I very much support this feature. What I am doing to workaround this is the following: Disable all auth-module redirects:
And handle everything yourself in your callback hook:
Important is this line: It might not be the wisest idea to use this.$auth.$storage.get/setCookie not sure about that |
Beta Was this translation helpful? Give feedback.
-
I'll definitely give this a try. |
Beta Was this translation helpful? Give feedback.
-
I was try this but when redirected u got no user's info need a refresh to got the data. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I know that the module supports redirection after logging in to guarded routes using the
home
andrewriteRedirect
options. Is there a similar approach offered by the module for scenarios where we might want to trigger authentication explicitly on a public route?For example, let's say on clicking a button
Log In
on an unguarded route calledpublic-route
we trigger the authentication using loginWith("strategy"). Looks like the redirection doesn't work out of the box for such scenarios. It only works for guarded routes?Beta Was this translation helpful? Give feedback.
All reactions