Skip to content

Commit a4e1430

Browse files
authored
Merge pull request #264 from ErichKramer/client_id-pkce-example
fix: add client_id field to pkce auth example.
2 parents 5c1be56 + 6db6de3 commit a4e1430

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/authenticate/pkce/pkce.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"fmt"
1212
spotifyauth "github.com/zmb3/spotify/v2/auth"
1313
"log"
14+
"os"
1415
"net/http"
1516

1617
"golang.org/x/oauth2"
@@ -45,6 +46,7 @@ func main() {
4546
url := auth.AuthURL(state,
4647
oauth2.SetAuthURLParam("code_challenge_method", "S256"),
4748
oauth2.SetAuthURLParam("code_challenge", codeChallenge),
49+
oauth2.SetAuthURLParam("client_id", os.Getenv("CLIENT_ID")),
4850
)
4951
fmt.Println("Please log in to Spotify by visiting the following page in your browser:", url)
5052

0 commit comments

Comments
 (0)