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

Commit e5b754d

Browse files
committed
Do not change auth status to anonymous when there is a progress error during token acquisition.
1 parent 6b4b574 commit e5b754d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app/authentication/authentication.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ export class AuthenticationComponent extends GraphExplorerComponent {
2626

2727
public authInfo = this.explorerValues.authentication;
2828

29-
constructor(private sanitizer: DomSanitizer, private apiService: GraphService,
30-
private changeDetectorRef: ChangeDetectorRef) {
29+
constructor(
30+
private sanitizer: DomSanitizer, private apiService: GraphService,
31+
private changeDetectorRef: ChangeDetectorRef) {
3132
super();
3233
this.acquireTokenCallBack = this.acquireTokenCallBack.bind(this);
3334
this.acquireTokenErrorCallBack = this.acquireTokenErrorCallBack.bind(this);
@@ -161,7 +162,7 @@ export class AuthenticationComponent extends GraphExplorerComponent {
161162
* We only want to change the authentication status to anonymous for errors other than those
162163
* that require interation from the user.
163164
*/
164-
if (!requiresInteraction(error.errorCode)) {
165+
if (!requiresInteraction(error.errorCode) || error.errorCode !== 'acquiretoken_progress_error') {
165166
AppComponent.explorerValues.authentication.status = 'anonymous';
166167
}
167168
}

0 commit comments

Comments
 (0)