@@ -165,12 +165,12 @@ func (g *Goic) checkState(state string) (string, error) {
165
165
166
166
// Authenticate tries to authenticate a user by given code and nonce
167
167
// It is where token is requested and validated
168
- func (g * Goic ) Authenticate (p * Provider , code , nonce , curl string ) (* Token , error ) {
168
+ func (g * Goic ) Authenticate (p * Provider , code , nonce , redir string ) (* Token , error ) {
169
169
if ! g .Supports (p .Name ) {
170
170
return & Token {Provider : p .Name }, ErrProviderSupport
171
171
}
172
172
173
- tok , err := g .getToken (p , code , curl )
173
+ tok , err := g .getToken (p , code , redir , "authorization_code" )
174
174
if err != nil {
175
175
return tok , err
176
176
}
@@ -298,8 +298,8 @@ func (g *Goic) process(res http.ResponseWriter, req *http.Request) {
298
298
return
299
299
}
300
300
301
- qry , curl := req .URL .Query (), currentURL (req , false )
302
- restart := ` (<a href="` + curl + `">restart</a>)`
301
+ qry , redir := req .URL .Query (), currentURL (req , false )
302
+ restart := ` (<a href="` + redir + `">restart</a>)`
303
303
if msg := qry .Get ("error" ); msg != "" {
304
304
if desc := qry .Get ("error_description" ); desc != "" {
305
305
msg += ": " + desc
@@ -324,7 +324,7 @@ func (g *Goic) process(res http.ResponseWriter, req *http.Request) {
324
324
return
325
325
}
326
326
327
- tok , err := g .Authenticate (p , code , nonce , curl )
327
+ tok , err := g .Authenticate (p , code , nonce , redir )
328
328
if err != nil {
329
329
g .errorHTML (res , err , restart , "authenticate" )
330
330
return
0 commit comments