简体   繁体   English

使用 hash、Azure Active Directory 重定向/回复 URL

[英]Redirect/reply URLs with hash, Azure Active Directory

I want the navigate back to an Angular application after logging in through Azure AD.我希望在通过 Azure AD 登录后导航回 Angular 应用程序。

The reply URL I want is: http://localhost:4200/#/authcallback我想要的回复 URL 是:http://localhost:4200/#/authcallback

Is there a way to make Azure AD redirect URL with a hash?有没有办法用 hash 制作 Azure AD 重定向 URL?

It is a known bug: https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/100这是一个已知的错误: https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/100

Even though you set the redirect URL with http://localhost:4200/#/authcallback , it will return https://localhost:4200/#access_token=xxxx .即使您使用http://localhost:4200/#/authcallback设置重定向 URL ,它也会返回https://localhost:4200/#access_token=xxxx 4 访问。

You could upvote the feature request here , and there is a workaround in the comment.您可以在此处对功能请求进行投票,评论中有解决方法。

Workaround - an endpoint that remembers the correct application link including the hash tag, redirecting itself to that correct link.解决方法 - 记住正确应用程序链接(包括 hash 标记)的端点,将自身重定向到该正确链接。

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

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