Skip to content

Commit

Permalink
Merge branch 'dev' into test-msal-browser-example
Browse files Browse the repository at this point in the history
  • Loading branch information
tnorling committed Jan 5, 2021
2 parents 2d0fa4e + 39f54ad commit 2938971
Showing 1 changed file with 3 additions and 4 deletions.
@@ -1,7 +1,6 @@
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
import { MsalService, MsalBroadcastService, MSAL_GUARD_CONFIG, MsalGuardConfiguration } from '@azure/msal-angular';
import { EventMessage, EventType, InteractionType, PopupRequest, RedirectRequest } from '@azure/msal-browser';
import { AuthenticationResult, AuthError } from '@azure/msal-common'
import { EventMessage, EventType, InteractionType, PopupRequest, RedirectRequest, AuthenticationResult, AuthError } from '@azure/msal-browser';
import { Subject } from 'rxjs';
import { filter, takeUntil } from 'rxjs/operators';
import { b2cPolicies } from './b2c-config';
Expand Down Expand Up @@ -90,15 +89,15 @@ export class AppComponent implements OnInit, OnDestroy {
this.msalGuardConfig
if (this.msalGuardConfig.interactionType === InteractionType.Popup) {
if (this.msalGuardConfig.authRequest) {
this.authService.loginPopup({...this.msalGuardConfig.authRequest, ...userFlowRequest})
this.authService.loginPopup({...this.msalGuardConfig.authRequest, ...userFlowRequest} as PopupRequest)
.subscribe(() => this.checkAccount());
} else {
this.authService.loginPopup(userFlowRequest)
.subscribe(() => this.checkAccount());
}
} else {
if (this.msalGuardConfig.authRequest){
this.authService.loginRedirect({...this.msalGuardConfig.authRequest, ...userFlowRequest});
this.authService.loginRedirect({...this.msalGuardConfig.authRequest, ...userFlowRequest} as RedirectRequest);
} else {
this.authService.loginRedirect(userFlowRequest);
}
Expand Down

0 comments on commit 2938971

Please sign in to comment.