简体   繁体   English

如何在静态html角度网站中使用Azure授权社交提供程序?

[英]How to use Azure Authorization social providers with a static html angular website?

I have followed this documentation on how to use the azure social authorization provider for google plus sign-in. 我已按照此文档说明了如何使用Azure社交授权提供程序进行Google Plus登录。 https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-how-to-configure-google-authentication https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-how-to-configure-google-authentication

After authentication is finished it sends the app to this page: https://yourapp.azurewebsites.net/.auth/login/done 身份验证完成后,它将应用程序发送到以下页面: https : //yourapp.azurewebsites.net/.auth/login/done

Is the post_login_redirect_url a way to redirect back to your web application and pass the token? post_login_redirect_url是否可以重定向回您的Web应用程序并传递令牌?

Is there anyway to redirect back to your static html website with the token? 无论如何,是否使用令牌将其重定向回您的静态html网站?

After looking more into the post_login_redirect_url it looks like the way is that this parameter is attached like this /.auth/login/?post_login_redirect_url=/ 在深入研究了post_login_redirect_url之后,看起来好像是这样附加了此参数:/.auth/login/?post_login_redirect_url=/

You can then grab the token from your url as it is stored in the hash value. 然后,您可以从URL中获取令牌,因为它存储在哈希值中。

This question was helpful: How to set Azure Authentication custom login return url? 该问题很有帮助: 如何设置Azure身份验证自定义登录返回URL?

Another way to get the token that I found was to call /.auth/me to get back your authorized array of tokens. 获取我发现的令牌的另一种方法是调用/.auth/me以取回授权的令牌数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM