Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

πŸ₯… Catch if get user fails

Alicia Sykesd65ee7aac7c0
diff --git a/src/utils/auth/OidcAuth.js b/src/utils/auth/OidcAuth.js
index 645cd48e..8bdb82d2 100644
--- a/src/utils/auth/OidcAuth.js
+++ b/src/utils/auth/OidcAuth.js
@@ -188,9 +188,9 @@ class OidcAuth {
statusErrorMsg('OIDC', 'API request needs a fresh token, but silent renewal is disabled');
return false;
}
- const user = await this.userManager.getUser();
+ const user = await this.userManager.getUser().catch(() => null);
if (!user) {
- statusErrorMsg('OIDC', 'API request was rejected and there is no active session to renew. Please sign in again.');
+ statusErrorMsg('OIDC', 'No active session to renew; sign in again.');
return false;
}
if (!user.refresh_token) {