From 4e3156ecd8e87108c006ae539abbb210e6495d55 Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Mon, 5 Feb 2024 12:57:40 +0100 Subject: [PATCH] Increase logging level to error when discarding tokens, this should only need to happen on localhost. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ab48507..d762a42 100644 --- a/src/index.js +++ b/src/index.js @@ -113,7 +113,7 @@ class LoginClient { const issuerOrigin = new URL(userData.iss).hostname; const hostUrlOrigin = new URL(this.hostUrl).hostname; if (!issuerOrigin.endsWith(hostUrlOrigin) && !hostUrlOrigin.endsWith(issuerOrigin)) { - this.logger && this.logger.log && this.logger.log({ title: 'Token saved in browser is for a different issuer, discarding', issuerOrigin, hostUrlOrigin, savedUserData: userData }); + this.logger && this.logger.error && this.logger.error({ title: 'Token saved in browser is for a different issuer, discarding', issuerOrigin, hostUrlOrigin, savedUserData: userData }); userIdentityTokenStorageManager.clear(); return null; }