Skip to content

Commit

Permalink
bump api version
Browse files Browse the repository at this point in the history
  • Loading branch information
brianstrauch committed Jun 30, 2021
1 parent c9e132a commit e9f1af4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/blang/semver v3.5.1+incompatible
github.com/brianstrauch/spotify v0.3.0
github.com/brianstrauch/spotify v0.3.1
github.com/pkg/browser v0.0.0-20210606212950-a7b7a6107d32
github.com/rhysd/go-github-selfupdate v1.2.3
github.com/spf13/cobra v1.1.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/brianstrauch/spotify v0.3.0 h1:09iAmmn3pncnCdHOghiBH2r619HkWt35j59yEBXwUt0=
github.com/brianstrauch/spotify v0.3.0/go.mod h1:sImRT74obai+LNgFVxr+qNVq2yt5KEfvNxz6ZDfYWaA=
github.com/brianstrauch/spotify v0.3.1 h1:IBd0vkal0bs+yilvp+6VR4aL9q94qiionwYHETcOHS4=
github.com/brianstrauch/spotify v0.3.1/go.mod h1:sImRT74obai+LNgFVxr+qNVq2yt5KEfvNxz6ZDfYWaA=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
Expand Down
2 changes: 1 addition & 1 deletion internal/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func Authenticate() (*spotify.API, error) {
func refresh() error {
refresh := viper.GetString("refresh_token")

token, err := spotify.RefreshToken(refresh, ClientID)
token, err := spotify.RefreshPKCEToken(refresh, ClientID)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions internal/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewCommand() *cobra.Command {

func login() (*spotify.Token, error) {
// 1. Create the code verifier and challenge
verifier, challenge, err := spotify.CreateVerifierAndChallenge()
verifier, challenge, err := spotify.CreatePKCEVerifierAndChallenge()
if err != nil {
return nil, err
}
Expand All @@ -73,7 +73,7 @@ func login() (*spotify.Token, error) {
spotify.ScopeUserReadPlaybackState,
}

uri := spotify.BuildAuthURI(internal.ClientID, RedirectURI, challenge, state, scopes...)
uri := spotify.BuildPKCEAuthURI(internal.ClientID, RedirectURI, challenge, state, scopes...)

// 3. Your app redirects the user to the authorization URI
if err := browser.OpenURL(uri); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {
root := &cobra.Command{
Use: "spotify",
Short: "Spotify for the terminal 🎵",
Version: "1.8.1",
Version: "1.8.2",
PersistentPreRunE: promptUpdate,
}

Expand Down

0 comments on commit e9f1af4

Please sign in to comment.