-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
UI - support redirecting to an intended URL after authentication #7088
Conversation
76e4092
to
df728d5
Compare
…he redirect_to query param
…oot don't end up in redirect_to
* add redirect_to query param * alias auth controller state to vault controller where the query param is defined * capture the current url before redirecting a user to auth if they're being redirected * consume and reset the redirectTo query param when authenticating * make sure that the current url when logging out does not get set as the redirect_to query param * add unit tests for the mixin and make it so that redirects from the root don't end up in redirect_to * acceptance tests for redirect
* add redirect_to query param * alias auth controller state to vault controller where the query param is defined * capture the current url before redirecting a user to auth if they're being redirected * consume and reset the redirectTo query param when authenticating * make sure that the current url when logging out does not get set as the redirect_to query param * add unit tests for the mixin and make it so that redirects from the root don't end up in redirect_to * acceptance tests for redirect
…) (#7263) * add redirect_to query param * alias auth controller state to vault controller where the query param is defined * capture the current url before redirecting a user to auth if they're being redirected * consume and reset the redirectTo query param when authenticating * make sure that the current url when logging out does not get set as the redirect_to query param * add unit tests for the mixin and make it so that redirects from the root don't end up in redirect_to * acceptance tests for redirect
Thanks a lot, this is awesome @meirish! I'm trying to get the functionality described in #5107 to work, but when I visit the following URL:
I expect to be:
Steps 1. and 2. work, however the redirect after login does not happen. Am I doing something wrong? |
Hey @zx8 ! It looks like I added a redirect that clears the query param on logout to fix a different issue and I forgot about the original use case - sorry about that! I'll create an issue to allow the use of both of them on the logout route. |
@meirish Thanks a lot. 😄 |
Currently if you're unauthenticated and you try to follow a link to a deeper page, the UI will boot you out to authenticate, but then just send you back to the secret engines list page upon successful authentication.
This PR changes that behavior so that if you're being redirected to authenticate, we save the url to the
redirect_to
query param which is then used in the auth-form.js component.Fixes #7068