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

OAuth migration | Refactor GU_SO handling based on new flow #1288

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

raphaelkabo
Copy link
Contributor

@raphaelkabo raphaelkabo commented Jan 9, 2024

What does this change?

In the new flow, we first check if the access and ID tokens are set. If so, we check if the GU_SO cookie was set after the access token's iat claim, which means that the user signed out after they generated these tokens. In this case, we follow the signout behaviour. Otherwise, we handle the subsequent cases (IDAPI cookies are/aren't set). If the GU_SO cookie was set before the iat claim, we can safely ignore it, and continue the flow as above.

For documentation on this, see this PR: guardian/gateway#2530

coldlink
coldlink previously approved these changes Jan 10, 2024
In the new flow, we first check if the access and ID tokens are set. If so, we check if the GU_SO cookie was set after the access token's iat claim, which means that the user signed out after they generated these tokens. In this case, we follow the signout behaviour. Otherwise, we handle the subsequent cases (IDAPI cookies are/aren't set). If the GU_SO cookie was set before the iat claim, we can safely ignore it, and continue the flow as above.
@raphaelkabo raphaelkabo merged commit 1b80aca into main Jan 11, 2024
11 checks passed
@raphaelkabo raphaelkabo deleted the rk/fix-signout-flow branch January 11, 2024 13:40
@prout-bot
Copy link
Collaborator

Seen on PROD (merged by @raphaelkabo 10 minutes and 48 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants