问题
The authentication process for O365 requires adding the redirect URL in a whitelist on the app’s dashboard on Azure.
However, this whitelist doesn't work with domain names. It requires to add the entire URL for every page which is not possible if you have a huge number of URLs, plus some of the URLs are dynamically generated by the backend. Is it possible to whitelist the domain with all its sub-directories/URLs in one go?
回答1:
No, it is not (unless you want to use wildcards, which you shouldn't).
In general when you need dynamic redirects, you should store the location you want to redirect to locally in a cookie/session/local storage/session storage. Then use a single redirect URL, and when you get the redirect there, get that stored "local redirect URL" from where you stored it, and redirect the user there.
I touched upon this on a recent article: https://joonasw.net/view/avoiding-wildcard-reply-urls-with-msal-js
来源:https://stackoverflow.com/questions/56341564/whitelist-domain-names-on-azure-ad-with-app-registration