Is it possible to log out without redirect?
Every time I sign up user I need to verify if the user that is in external DB (db with invitation tokens). I do it just after sign up is completed. When I discover that user shouldn't be a allowed to log in I need to call logout
to clear cookies/storage in login popups (if I don't after opening singin popup again azure tries to log user in automatically and is not allowing to, for example, sign up again).
The refresh of the page is unnecessary in my case, since it's a sign up process and I'm already at the login page to what it refreshes.
When logging out we need to clear the cookies both for the application, and for https://msft.sts.microsoft.com. Clearing the cookies for https://msft.sts.microsoft.com can only be done by the STS itself (security isolation), and therefore it needs to redirect to the postlogoutRedirectUrl afterward.
It looks like logoutPopup() isn't currently supported in MSAL.js. Such a method would allow your users to stay within the popup window. https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/113
You can create a feature request for this here. https://feedback.azure.com/forums/169401-azure-active-directory?query=msal.js%20logout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With