Skip to content

Commit

Permalink
Increase logging level to error when discarding tokens, this should o…
Browse files Browse the repository at this point in the history
…nly need to happen on localhost.
  • Loading branch information
wparad committed Feb 5, 2024
1 parent 2f9b7ce commit 4e3156e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4e3156e

Please sign in to comment.