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

method revokeTokenAndLogout() while revoking accessToken and refreshToken async returns 1 off api call with 401 #18283

Open
IKGRID opened this issue Dec 18, 2023 · 0 comments

Comments

@IKGRID
Copy link

IKGRID commented Dec 18, 2023

Details

After several times of logout spatacus use method revokeTokenAndLogout() from OAuthService and it doing revoke of 2 tokens refresh and access, it's mean it doing 2 api calls all the time. It happens that access token are revoked faster that refreshToken and when makes api call it use auth Bearer auth token and accessToken not valid as it was revoked already.
Pls check attached screenshots.

Impactas
When one of api call for revoking tokens return 401, it doesn't revoke token. It's huge security risk of potential unauthorised access on behalf of the customer.

Tell us the version of Spartacus

  • v6.0.0

angular-oauth2-oidc

  • v15.0.1

To Reproduce
Steps to reproduce the behavior:

  1. Login
  2. Logout
  3. Doing 2 prev steps few times
  4. Check 2 api calls baseURL/authorizationserver/oauth/revoke. One of then return 401.

Expected behavior
Should revoke refreshToken first and after accessToken

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2023-12-18 at 21 44 03
Screenshot 2023-12-18 at 21 44 23

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

No branches or pull requests

1 participant