This PR adds the current requested page as the return_to page when redirecting to login with aal=aal2.
This is especially true for when we want to redirect back to the original page the user was navigating to. This fixes the problem where a user has logged in and navigates directly to the settings page but still needs to complete MFA.
After completing the login flow the user is now stuck on the /welcome page.
[ ] I confirm that this pull request does not address a security vulnerability.
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] I have added the necessary documentation within the code base (if appropriate).
This PR adds the current requested page as the return_to page when redirecting to login with
aal=aal2
.This is especially true for when we want to redirect back to the original page the user was navigating to. This fixes the problem where a user has logged in and navigates directly to the settings page but still needs to complete MFA. After completing the login flow the user is now stuck on the
/welcome
page.Related Issue or Design Document
Checklist
Further comments