fix(auth): send redirect_uri when require access token
This commit is contained in:
parent
eb7b9dcf40
commit
68ca0a7371
1 changed files with 1 additions and 0 deletions
1
auth.go
1
auth.go
|
@ -140,6 +140,7 @@ func (a Auth) GetTokenFromCode(code string) (Token, error) {
|
||||||
form := url.Values{}
|
form := url.Values{}
|
||||||
form.Add("grant_type", "authorization_code")
|
form.Add("grant_type", "authorization_code")
|
||||||
form.Add("code", code)
|
form.Add("code", code)
|
||||||
|
form.Add("redirect_uri", a.clientConfig.RedirectURL)
|
||||||
|
|
||||||
req, err := http.NewRequest("POST", a.authConfig.TokenEndpoint, strings.NewReader(form.Encode()))
|
req, err := http.NewRequest("POST", a.authConfig.TokenEndpoint, strings.NewReader(form.Encode()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue