Cac*_*ing 20 oauth-2.0 google-oauth
我正在根据此网页创建和授权OAuth令牌:https://code.google.com/p/google-mail-oauth2-tools/wiki/OAuth2DotPyRunThrough
但是我收到了这个错误:redirect_uri_mismatch.
The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob did not match a registered redirect URI
from_login=1
cookie_policy_enforce=false
scope=https://mail.google.com/
response_type=code
access_type=online
redirect_uri=urn:ietf:wg:oauth:2.0:oob
as=-80019291b2cb8ed
display=page
pli=1
client_id=......
authuser=0
hl=en
Run Code Online (Sandbox Code Playgroud)
我认为这可能会有所帮助:Google OAuth 2授权 - 错误:redirect_uri_mismatch
但是当我尝试将重定向url注册到我的控制台时,我被告知该url无效.
Mik*_*nov 30
如果您使用的是Google+ javascript按钮(使用网络应用程序),则必须使用postmessage而不是实际的URI.我花了差不多一整天才弄明白这一点,因为谷歌的文档由于某种原因并没有明确表现出来.
对于我的网络应用程序,我通过写作纠正了我的错
instead of : http://localhost:11472/authorize/
type : http://localhost/authorize/
Run Code Online (Sandbox Code Playgroud)
当您在app上注册https://code.google.com/apis/console并创建客户端ID时,您有机会指定一个或多个重定向URI.redirect_uri您的身份验证URI上的参数值必须与其中一个完全匹配.
小智 5
为此浪费了 4 或 5 个小时...使用“postmessage”作为参数值,而不是真正的重定向 Uri...
$client->setRedirectUri('postmessage');
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
43461 次 |
| 最近记录: |