Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 6ee6611

Browse files
committed
added PromptValue
1 parent dd9ddef commit 6ee6611

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

2-Authorization-I/1-call-graph/SPA/src/app/account-switch/account-switch.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
MsalService,
44
MSAL_GUARD_CONFIG,
55
MsalGuardConfiguration,
6+
67
} from '@azure/msal-angular';
78
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
89
import {
@@ -11,6 +12,9 @@ import {
1112
SilentRequest,
1213
AccountInfo,
1314
} from '@azure/msal-browser';
15+
import {
16+
PromptValue
17+
} from '@azure/msal-common';
1418

1519
@Component({
1620
selector: 'app-account-switch-component',
@@ -33,7 +37,7 @@ export class AccountSwitchComponent implements OnInit {
3337
if (!account) {
3438
this.authService.instance.loginRedirect({
3539
...this.msalGuardConfig.authRequest,
36-
prompt: 'login',
40+
prompt: PromptValue.LOGIN,
3741
} as RedirectRequest);
3842
} else if (
3943
account &&
@@ -51,7 +55,8 @@ export class AccountSwitchComponent implements OnInit {
5155
if (error instanceof InteractionRequiredAuthError) {
5256
this.authService.instance.loginRedirect({
5357
...this.msalGuardConfig.authRequest,
54-
prompt: 'login',
58+
...this.msalGuardConfig.authRequest,
59+
prompt: PromptValue.LOGIN,
5560
} as RedirectRequest);
5661
}
5762
});

0 commit comments

Comments
 (0)