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

Organize submits expired access token #1277

Open
niklasva82 opened this issue May 10, 2021 · 1 comment
Open

Organize submits expired access token #1277

niklasva82 opened this issue May 10, 2021 · 1 comment

Comments

@niklasva82
Copy link
Member

niklasva82 commented May 10, 2021

To reproduce:

  1. Use a short expiration for access tokens
  2. Go to organize.dev.zetkin.org/people/list
  3. Wait for the access token to expire
  4. Click any of the people in the list

Expected: Sucessfully make XMLHttpRequest to fetch the person and its related fields and tags.
Actual: 401 {"error":"invalid_token","error_description":"Invalid token: access token has expired"}

Refreshing works as expected.

@richardolsson
Copy link
Member

I'm surprised that this isn't handled by the loginRedirect middleware in Redux, which should force a browser refresh when this happens. For anyone working on this issue, that's a good place to start.

https://github.com/zetkin/zetkin-common/blob/b1fd25ca1029b1fcea78aa89e5e69d3f97d417ca/redux/middleware/loginRedirect.js#L23-L31

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

2 participants