mirror of
https://git.sr.ht/~phw/scotty
synced 2025-05-04 07:27:05 +02:00
Custom OAuth2 TokenSource to persist refreshed tokens in database
This commit is contained in:
parent
4a9f26d9db
commit
e29d8e2a63
8 changed files with 92 additions and 39 deletions
|
@ -59,9 +59,8 @@ func (b *SpotifyApiBackend) OAuth2Config(redirectUrl *url.URL) oauth2.Config {
|
|||
}
|
||||
}
|
||||
|
||||
func (b *SpotifyApiBackend) OAuth2Setup(redirectUrl *url.URL, token *oauth2.Token) error {
|
||||
config := b.OAuth2Config(redirectUrl)
|
||||
b.client = NewClient(config, token)
|
||||
func (b *SpotifyApiBackend) OAuth2Setup(token oauth2.TokenSource) error {
|
||||
b.client = NewClient(token)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue