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

DM-46399: Rework handling of missing state during login #1106

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Conversation

rra
Copy link
Member

@rra rra commented Sep 20, 2024

If the authentication state is missing entirely, not incorrect, during return from authentication, the most likely explanation is that the user attempted multiple simultaneous logins and then finished the authentication in another browser window, thus invalidating the state.

In this case, redirect the user to their destination without further processing. If they did authentication separately, this is the (mostly) correct thing to do; they will go to the authenticated page, although their session might not be as currently as they would like.

If they're not authenticated, this will restart the authentication process with new state, which should be the correct thing to do. There is some risk of a redirect loop, but hopefully we won't go through that loop more than once, so browsers should cope.

If the authentication state is missing entirely, not incorrect,
during return from authentication, the most likely explanation is
that the user attempted multiple simultaneous logins and then
finished the authentication in another browser window, thus
invalidating the state.

In this case, redirect the user to their destination without further
processing. If they did authentication separately, this is the
(mostly) correct thing to do; they will go to the authenticated
page, although their session might not be as currently as they would
like.

If they're not authenticated, this will restart the authentication
process with new state, which should be the correct thing to do.
There is some risk of a redirect loop, but hopefully we won't go
through that loop more than once, so browsers should cope.
@rra rra enabled auto-merge September 20, 2024 00:36
@rra rra merged commit 8cf8d34 into main Sep 20, 2024
5 checks passed
@rra rra deleted the tickets/DM-46399 branch September 20, 2024 00:39
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.

1 participant