Skip to content

Commit

Permalink
msal: don't log MsalUserCancelException
Browse files Browse the repository at this point in the history
  • Loading branch information
sstasi95 committed Feb 19, 2025
1 parent cec0dd2 commit 38aab1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/services/msal_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class MsalService with AppLogger {
if (_pca == null) await init();

await _pca!.signOut();
} on MsalUserCancelException catch (_) {
// ignore
} on MsalException catch (e, s) {
logError(e, s);
}
Expand All @@ -52,6 +54,8 @@ class MsalService with AppLogger {
final token = await _pca!.acquireToken(scopes: _scopes, prompt: Prompt.selectAccount);
_isLoggedIn = true;
return token.accessToken;
} on MsalUserCancelException catch (_) {
return null;
} on MsalException catch (e, s) {
logError(e, s);
return null;
Expand Down

0 comments on commit 38aab1d

Please sign in to comment.