Skip to content

Commit

Permalink
use proposed changes from markbates/goth#113
Browse files Browse the repository at this point in the history
  • Loading branch information
jtolio committed Dec 29, 2016
1 parent 92c5abd commit 7c5a40e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions goth.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (a *AuthProvider) login(w http.ResponseWriter, r *http.Request) {
}

state := newState()
sess, err := a.Provider.BeginAuth(state)
sess, err := a.Provider.BeginAuth(ctx, state)
if err != nil {
wherr.Handle(w, r, err)
return
Expand Down Expand Up @@ -121,7 +121,7 @@ func (a *AuthProvider) callback(w http.ResponseWriter, r *http.Request) {
return
}

authToken, err := sess.Authorize(a.Provider, r.URL.Query())
authToken, err := sess.Authorize(ctx, a.Provider, r.URL.Query())
if err != nil {
wherr.Handle(w, r, err)
return
Expand Down Expand Up @@ -162,7 +162,7 @@ func (a *AuthProvider) User(ctx context.Context) (*goth.User, error) {
return nil, nil
}

u, err := a.Provider.FetchUser(sess)
u, err := a.Provider.FetchUser(ctx, sess)
if err != nil {
log.Printf("failed to fetch user: %v", err)
return nil, nil
Expand Down

0 comments on commit 7c5a40e

Please sign in to comment.