We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi guys, thanks for this package!
i'm trying to create an oAuth for spotify, but i have an "infinite loop" in the callback
func AuthSpotify(w http.ResponseWriter, r *http.Request) { tok, err := auth.Token(r.Context(), state, r) if err != nil { http.Error(w, "Couldn't get token", http.StatusForbidden) log.Fatal(err) } if st := r.FormValue("state"); st != state { http.NotFound(w, r) log.Fatalf("State mismatch: %s != %s\n", st, state) } client := spotify.New(auth.Client(r.Context(), tok)) // infinite loop ^^^ w.Header().Set("Content-Type", "text/html") fmt.Fprintf(w, "Login Completed!") ch <- client }
i send the url to my front with this function:
func GetSpotifyUrl(w http.ResponseWriter, r *http.Request) { fmt.Println("ok") url := auth.AuthURL(state) res, _ := json.Marshal(url) w.WriteHeader(http.StatusOK) w.Write(res) }
the redirect is working and call my callback, but i'm stuck in this callback function :/
can you help me? thanks a lot!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi guys, thanks for this package!
i'm trying to create an oAuth for spotify, but i have an "infinite loop" in the callback
i send the url to my front with this function:
the redirect is working and call my callback, but i'm stuck in this callback function :/
can you help me? thanks a lot!
The text was updated successfully, but these errors were encountered: