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

Same access_token after refresh #154

Open
vvscode opened this issue Aug 31, 2023 · 1 comment
Open

Same access_token after refresh #154

vvscode opened this issue Aug 31, 2023 · 1 comment

Comments

@vvscode
Copy link

vvscode commented Aug 31, 2023

Hey. Is it expected to have the same access token on calling fetch with --refresh?

Just based on the naming I would expect to have different tokens in output, but I do have the same

Screenshot 2023-08-31 at 10 44 49

P.S. the original problem I'm trying to solve is to understand why google API gives me invalid_token while oauth2l info says that token is ok

@andyrzhao
Copy link
Collaborator

Hi there, from the top of my head:

  1. The refresh parameter is used to refresh expired access tokens (using a valid refresh_token, and skips the user consent screen), so it's possible that the token has not expired, and refreshing was skipped. You can try deleting the cache to force a new token to be fetched.
  2. If you get "invalid_token" from google backend, it could be due to using the incorrect scope (normally, you will need cloud-platform as the scope, see ReadMe.) There could also be a formatting error, I wouldn't know until you provide more details.
    Hope that helps!

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