We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98e7fc6 commit 962d62aCopy full SHA for 962d62a
src/providers/MsalProvider.ts
@@ -42,12 +42,16 @@ export class MsalProvider extends IProvider {
42
}
43
44
public async trySilentSignIn() {
45
- if (this._userAgentApplication.isCallback(window.location.hash)) {
46
- return;
47
- }
48
- if (this._userAgentApplication.getAccount() && (await this.getAccessToken(null))) {
49
- this.setState(ProviderState.SignedIn);
50
- } else {
+ try {
+ if (this._userAgentApplication.isCallback(window.location.hash)) {
+ return;
+ }
+ if (this._userAgentApplication.getAccount() && (await this.getAccessToken(null))) {
+ this.setState(ProviderState.SignedIn);
51
+ } else {
52
+ this.setState(ProviderState.SignedOut);
53
54
+ } catch (e) {
55
this.setState(ProviderState.SignedOut);
56
57
0 commit comments