zmb3 / spotify

A Go wrapper for the Spotify Web API
Apache License 2.0
1.34k stars 284 forks source link

Authenticator.SetInfo() doesn't seem to override client_id and client_secret. #149

Closed radiohertz closed 3 years ago

radiohertz commented 3 years ago

Example

    auth := spotify.NewAuthenticator("http://localhost:5000",
        spotify.ScopeUserReadRecentlyPlayed, spotify.ScopeUserTopRead)

    url := auth.AuthURL("state")
    auth.SetAuthInfo(conf.ClientID, conf.ClientSecret)

Output

https://accounts.spotify.com/authorize?client_id=&redirect_uri=http%3A%2F%2Flocalhost%3A5000&response_type=code&scope=user-read-recently-played+user-top-read+user-read-playback-state+playlist-modify-private+playlist-modify-public+playlist-read-private+user-library-modify+user-library-read+user-read-private&state=state

it still uses the environmental variables.

Edit: My bad, nevermind.