Microsoft-authentication-library-for-js: need for logoutPopup() [was logout: Should not redirect the user to our homepage]

Created on 17 Aug 2017  路  6Comments  路  Source: AzureAD/microsoft-authentication-library-for-js

When logging out, it is redirecting the user to the homepage. I know that you can specify the postlogoutRedirectUrl, but in an SPA like Angular this requires us to save everything in cache.
Ideally this happens in a popup, similar to logging in.

enhancement

Most helpful comment

@jmprieur login has two functions, loginPopup() and loginRedirect(). I use loginPopup and that works great.

however, logout only has one function: logout(). So what I'd like to see is a logoutPopup() method.

I'm not using any wrapper, using MSAL JS straight in an Angular 4 app :)

All 6 comments

@rolandoldengarm : when login 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 epostlogoutRedirectUrl afterwards.
This is by design

@jmprieur but why can't this happen in a popup?

@rolandoldengarm : if you use the popup mode, I'd expect this to happen in the popup (I believe it does in plain JavaScript). Which Angular wrapper did you use for MSAL?

@jmprieur login has two functions, loginPopup() and loginRedirect(). I use loginPopup and that works great.

however, logout only has one function: logout(). So what I'd like to see is a logoutPopup() method.

I'm not using any wrapper, using MSAL JS straight in an Angular 4 app :)

@rohitnarula7176 - Why is this closed? Has this feature been delivered? I can't see it in the library. Using msal 1.3.0

@IainAdamsLabs No, logoutPopup has not been added. There is an open feature request for it here: #1386

Was this page helpful?
0 / 5 - 0 ratings