简体   繁体   中英

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. 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

Is the post_login_redirect_url a way to redirect back to your web application and pass the token?

Is there anyway to redirect back to your static html website with the token?

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=/

You can then grab the token from your url as it is stored in the hash value.

This question was helpful: How to set Azure Authentication custom login return url?

Another way to get the token that I found was to call /.auth/me to get back your authorized array of tokens.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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