使用Azure的移动应用为谷歌认证 [英] using Azure Mobile App for Google authentication
问题描述
我按照这个<一个href=\"https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-how-to-configure-google-authentication/\"相对=nofollow>谷歌为验证我的Web应用程序的教程。
我在指定我的谷歌开发者控制台以下内容:
授权JavaScript源=我的Azure移动应用程序网址授权重定向的URI =我的web应用程序网址+ /.auth/login/google/callback
但在这种情况下,我得到以下错误:
<醇开始=400>
这是一个错误。
错误:redirect_uri_mismatch
在请求重定向URI:
移动应用程序URL + .auth /登录/谷歌/回调做
没有注册的重定向URI相匹配。
块引用>如果我用我的手机应用程序,而不是Web应用程序的URL授权的URL重定向的URI,它的工作,而不是重定向到我的网站。
我怎么可以指定授权JavaScript来源不同的URL和授权重定向的URI?
解决方案您很可能运行到外部重定向的URI根据托管评论。退房的开发者指南这里的认证部分:<一href=\"https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-cordova-how-to-use-client-library/#auth\" rel=\"nofollow\">https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-cordova-how-to-use-client-library/#auth - 最后一节是关于更新CORS和外部重定向的URI
。I follow this tutorial for Google authentication for my web application.
I specified the following in my Google Developers Console:
Authorized JavaScript origins = my Azure mobile app url Authorized redirect URIs = my web app url + /.auth/login/google/callback
But in this case I get the following error:
- That’s an error.
Error: redirect_uri_mismatch
The redirect URI in the request: mobile app url + .auth/login/google/callback did not match a registered redirect URI.
If I use url of my mobile app instead of web app url for Authorized redirect URIs, it work, but not redirected to my web site.
How I can specify different urls for Authorized JavaScript origins and Authorized redirect URIs?
解决方案You are likely running into the External Redirect URIs based on your Hosted comment. Check out the authentication section of the developer guide here: https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-cordova-how-to-use-client-library/#auth - the last section is on updating CORS and the external redirect URIs.
这篇关于使用Azure的移动应用为谷歌认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!