Skip to content
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

Support dynamic return_to address on verification flow #1123

Closed
davidthor opened this issue Mar 5, 2021 · 1 comment
Closed

Support dynamic return_to address on verification flow #1123

davidthor opened this issue Mar 5, 2021 · 1 comment
Labels
feat New feature or request.

Comments

@davidthor
Copy link

Is your feature request related to a problem? Please describe.

Most flows support a return_to search parameter in the URLs to override default redirect behavior. It seems the verification flow is the one exception where there is no such logic and the user is always routed to the verification UI URL instead. This leaves me with no way for the upstream application to identify itself to the verification URL and allow the user to easily return back to the main application.

Describe the solution you'd like

I'd like to be able to provide a custom return_to URL (that matches my configured whitelist of course) that the verification flow will route back to upon successful verification. If I route my user to /self-service/verification/browser?return_to=http://app.domain.com, I would expect them to be routed back to http://app.domain.com after completing the verification flow by navigating to: /self-service/verification/methods/link?token=<token>.

Describe alternatives you've considered

Right now I've made this a query string parameter supported by my UI application. I then store the value in the UI application session and trigger the return when the verification flow state is set to passed_challenge.

Additional context

My only problem with this flow is that I have to introduce the idea of a session to the UI application code to store this value. If the return_to value was in the flow object like described in #1121, I'd be more than happy to instrument this logic in the UI application myself since it's a simple conditional on my verification page.

@aeneasr
Copy link
Member

aeneasr commented Mar 8, 2021

Yes that makes sense! Would you be up for a contribution here? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants