-
Notifications
You must be signed in to change notification settings - Fork 295
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
refresh token #221
Comments
this library is using the golang.org oauth2 client behind the scenes, it will handle the refresh for you when the token has expired. "Client returns an HTTP client using the provided token. The token will auto-refresh as necessary. The underlying HTTP transport will be obtained using the provided context" |
Does it means i dont want to ask user to login each1h? after token gets expired? |
I am sorry for waking this Thread up again, but is this true? How can I hook into this? Here is my current situation: I am asking users to connect their Spotify Account to my App to retrieve information about a User (specifically, their Followed Artists). I am then periodically synchronizing their Artists with a simple m2m Table in my DB and Fetching releases for my Users to display a proper and complete "New Releases" page. I currently have an Issue where I frequently get revoked token Errors due to the refresh token already being used somewhere and had issues to track the exact place where it happens down. |
I'm just gonna answer myself here. Spotify revokes refresh tokens after a single use, and the OAuth2 library did indeed automatically refresh my users access token. |
spotify/examples/authenticate/authcode/authenticate.go
Line 31 in f897b41
hey there i used this method to generate oauth token to get user's current playing track. It shows it expires after one hour. How can i refresh token if its expired? without running a web auth again
The text was updated successfully, but these errors were encountered: