Skip to content

Commit

Permalink
fix: show login component flyout on after login (#3250)
Browse files Browse the repository at this point in the history
  • Loading branch information
tavikukko authored Jul 9, 2024
1 parent b7a737d commit 62b1ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mgt-components/src/components/mgt-login/mgt-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ export class MgtLogin extends MgtTemplatedTaskComponent {

const provider = Providers.globalProvider;
if (provider?.logout) {
const activeAccount = provider.getActiveAccount();
await provider.logout();
this.userDetails = null;
if (provider.isMultiAccountSupportedAndEnabled) {
const activeAccount = provider.getActiveAccount();
localStorage.removeItem(activeAccount?.id + this._userDetailsKey);
}
this.hideFlyout();
Expand Down Expand Up @@ -726,7 +726,7 @@ export class MgtLogin extends MgtTemplatedTaskComponent {
* @memberof MgtLogin
*/
private readonly onClick = (): void => {
if (this.userDetails && this._isFlyoutOpen) {
if (this.userDetails && this.flyout.isOpen) {
this.hideFlyout();
} else if (this.userDetails) {
this.showFlyout();
Expand Down

0 comments on commit 62b1ed4

Please sign in to comment.