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

AUT-3725: Redirect to error page if enter password response returns m… #2070

Merged

Conversation

BeckaL
Copy link
Contributor

@BeckaL BeckaL commented Sep 17, 2024

…issing or invalid session

This error response means that we cannot continue. However, at the moment we fall through to the default error behaviour, which is to reload the page with a validation error, making it seem like the user entered the incorrect password.

This handles an edge case in reauthentication whereby the user is logged in in two tabs, starts a reauth journey in another up until the point of entering a password, and then logs out in the first tab. At this point, they will enter an infinite loop of seeming password validation errors regardless of password, whereas in fact the backend is totally unable to proceed.

It's also possible to replicate this in the signin journey, although you have to be very specific with timings.

Currently, redirecting to the error page will return a 500 status. This particular case (a user has logged off) does not actually indicate a server error. We can choose to update this later if this causes an issue.

How to review

Deploy to a test environment and:

  • Log in on two tabs in the same browser
  • Start a reauth journey in one and enter email
  • Logout in the second tab
  • See that whatever password you enter in your reauth journey, you hit an error page

You can compare to the behaviour in staging.

@BeckaL BeckaL requested review from a team as code owners September 17, 2024 16:24
…issing or invalid session

This error response means that we cannot continue. However, at the moment we fall through to the default error behaviour, which is to reload the page with a validation error, making it seem like the user entered the incorrect password.

This handles an edge case in reauthentication whereby the user is logged in in two tabs, starts a reauth journey in another up until the point of entering a password, and then logs out in the first tab. At this point, they will enter an infinite loop of seeming password validation errors regardless of password, whereas in fact the backend is totally unable to proceed.

It's also possible to replicate this in the signin journey, although you have to be very specific with timings.
@BeckaL BeckaL force-pushed the AUT-3725/return-error-for-no-session-response-on-password-entry branch from ddabacd to 23d94f5 Compare September 17, 2024 16:30
Copy link

sonarcloud bot commented Sep 17, 2024

@BeckaL BeckaL merged commit 2a08920 into main Sep 18, 2024
7 checks passed
@BeckaL BeckaL deleted the AUT-3725/return-error-for-no-session-response-on-password-entry branch September 18, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants