Get google refresh token and redirect url mismatch
im using the google plus auth with JS:
gapi.auth.authorize({
'client_id': #ID#,
'scope': , 'https://www.googleapis.com/auth/plus.login'
'immediate': false,
'access_type': 'offline',
'response_type': 'code'
});
after that i'm getting the code for further auth. I'm sending the response
code to my perl script and doing an LWP Request:
my $req = POST('https://accounts.google.com/o/oauth2/token', {
code => $args{'code'},
client_id => ##CLIENTID##,
client_secret => ##CLIENTSECRET##,
redirect_uri => 'https://mydomain/other/site',
grant_type => 'authorization_code'
});
i only get an "redirect_uri_mismatch". I provide the uri
"https://mydomain/other/site" in the google developer console in "Client
ID for web applications"
i'm going with this doc:
https://developers.google.com/accounts/docs/OAuth2WebServer?hl=de#offline
No comments:
Post a Comment