Closed rohitbankia closed 4 years ago
Probably, you could make use of postLogoutRedirectUri property in configuration.
For Ex:
{ "tenant": "xxxxxxxxxxxxxxxxxxxxxx", "clientId": "xxxxxxxxxxxxxxxxxxxxxx", "redirectUri": "xxxxxxxxxxxxxxxxxxxxxx", "postLogoutRedirectUri": "http://localhost:4200/" }
Session is timed-out or user logs out intentionally, app will be redirect to the URL specified on postLogoutRedirectUri that way we need not specify each reply URL.
However, user has to navigate back to manually to intended page.
Hope this helps.
by default postLogoutRedirectUri takes the value of redirectUri which is fine for me. i tried giving both but it goes in a loop are these values correct or need to give it as a static one? redirectUri: window.location.origin + '/home', postLogoutRedirectUri: window.location.origin
I would suggest you to use the static one
If this is still an issue, can you please provide some more information? Like the configuration you're passing into AuthenitcationContext
. These redirects also have to be registered in Azure, yes.
Additionally, that redirect loop is a known bug in adal js
, and is fixed in msal js
. adal js
is still supported only for security fixes. All current authentication work from Microsoft is delivered through the msal js
library here. We recommend moving to msal js
for any advanced feature requests and bugfixes.
I'm submitting a...
Browser:
Library Name
Library version
Library version: 1.0.17
Current behavior
When the user is idle and is logged out and refreshes the page then the user is asked to login and the redirect url is by default the last url from where the login request was made. after login the user is not able to see the page and this error comes up saying the url is not configured as part of reply url in Azure. I tried using the redirect url in the code but still the url has the last url from which the login request was made. (redirect_uri=https%3A%2F%2Flocalhost%3A4200%2Ffe%2F001) but in code redirectUri: window.location.origin + '/home' Do we need to configure each and every possible URL of the application as reply URL in Azure AD as it does not support wild card? I might be missing any steps in development or missing configurations. Any help would be great as its been days but did not find any solution. Thanks
Expected behavior
For any web application this scenario is valid and after login after timeout the user should be in the same page he was before
Minimal reproduction of the problem with instructions
Log in to the application with Azure AD Navigate to any random valid URL of the application Be idle for the time you are logged out (15-20 mins) Refresh the page and it will ask you to login again and redirect url will have the last url from which login was requested