summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--main.go4
2 files changed, 4 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 70fa4df..a26e30f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@
go.work
# End of https://www.toptal.com/developers/gitignore/api/dotenv,go
+142bot-web
diff --git a/main.go b/main.go
index c51a301..75d5a2d 100644
--- a/main.go
+++ b/main.go
@@ -82,6 +82,8 @@ func SpotifyAuth(w http.ResponseWriter, r *http.Request) {
logoru.Error(err.Error())
return
}
+
+ http.Redirect(w, r, "/success", http.StatusFound)
}
func main() {
@@ -93,7 +95,7 @@ func main() {
spotifyConfig = oauth2.Config{
ClientID: os.Getenv("SPOTIFY_CLIENT_ID"),
ClientSecret: os.Getenv("SPOTIFY_CLIENT_SECRET"),
- Scopes: []string{"user-modify-playback-state", "user-read-email"},
+ Scopes: []string{"user-modify-playback-state", "user-read-playback-state", "user-read-email"},
RedirectURL: fmt.Sprintf("%s/oauth/spotify", os.Getenv("BASE_URL")),
Endpoint: endpoints.Spotify,
}