-
Notifications
You must be signed in to change notification settings - Fork 35
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
"Unauthorized" error when credentials expire #94
"Unauthorized" error when credentials expire #94
Comments
on issue |
@nolanmar511 Please update with the status. |
We are using google-auth-library 1.3.1 for development (based on our package-lock.json), so the token will be refreshed 5 minutes before it expires (rather than once it has expired). This should reduce the probability of these errors |
Of course we do! If the request fails with a 401 or 403, under many conditions we will try to refresh the token. We are changing some of this behavior in 2.0 to only retry if a refresh_token is present. Check this out: If there's another place you want retry logic, please do let me know! |
@JustinBeckwith -- Thanks! Is this logic new with 1.0? Prior to upgrading to 1.0, we'd seen the "Unauthorized" Error in our code. |
Nope, this has been around for a while. I think the code you added to add a higher expiry window likely cleaned a lot of these up. |
@nolanmar511 can you check if this is still an issue? |
Marking this as closed. |
The call to the request to create a profile can hang for up to an hour. If the credentials expire while this request is hanging, then an 'Unauthorized' error is returned.
To reduce the frequency of this error, we want to refresh the token before it has expired when making requests.
The text was updated successfully, but these errors were encountered: