equal
deleted
inserted
replaced
112 } |
112 } |
113 |
113 |
114 if code == "" { |
114 if code == "" { |
115 // URL to consent page to ask for permission |
115 // URL to consent page to ask for permission |
116 // for the scopes specified above. |
116 // for the scopes specified above. |
117 return conf.AuthCodeURL("state", oauth2.AccessTypeOffline), nil |
117 url := conf.AuthCodeURL("state", oauth2.AccessTypeOffline) + "&client_name=madonctl&redirect_uris=urn:ietf:wg:oauth:2.0:oob" |
|
118 return url, nil |
118 } |
119 } |
119 |
120 |
120 // Return token |
121 // Return token |
121 t, err := conf.Exchange(context.TODO(), code) |
122 t, err := conf.Exchange(context.TODO(), code) |
122 if err != nil { |
123 if err != nil { |