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

feat: sign out all sessions #60

Merged
merged 9 commits into from
Dec 30, 2024
Merged

feat: sign out all sessions #60

merged 9 commits into from
Dec 30, 2024

Conversation

andersonvcv
Copy link

@andersonvcv andersonvcv commented Dec 27, 2024

Description

Adding support for /sign_out_all_sessions.

/sign_out_all_sessions endpoint will remove the current session and make a POST request to IAM, configured via OAUTH2_PROXY_BACKEND_LOGOUT_ALL_SESSIONS_URL env, to invalidate all the tokens and sessions. This will not invalidate other user sessions.

Once the tokens and sessions are invalidated, after the refresh token period defined on the OAUTH2_PROXY_COOKIE_REFRESH env, OAuth will fail to refresh the access token and clear that session.

related to:

AB#1579962

Motivation and Context

Possibility for signing out on all devices.

How Has This Been Tested?

Integrated locally with PICS by running binary. Docs here.

Checklist:

  • Add OAUTH2_PROXY_BACKEND_LOGOUT_ALL_SESSIONS_URL env
  • Add /sign_out_all_sessions endpoint
  • Remove other user sessions when tokens are invalid

@github-actions github-actions bot added the docs label Dec 27, 2024
@github-actions github-actions bot added the tests label Dec 27, 2024
@andersonvcv andersonvcv marked this pull request as ready for review December 27, 2024 19:24
@andersonvcv andersonvcv requested a review from a team as a code owner December 27, 2024 19:24
@andersonvcv andersonvcv self-assigned this Dec 28, 2024
@andersonvcv andersonvcv merged commit 48f13a7 into pics Dec 30, 2024
4 checks passed
@andersonvcv andersonvcv deleted the anderson/add-sign-out-all branch December 30, 2024 11:43
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.

2 participants