Skip to content

Commit

Permalink
fix: use single quotes for username in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
NithinKuruba committed Jun 28, 2024
1 parent ecbf246 commit b769a48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ configureTotpMessage=You need to set up either a mobile, desktop or browser auth
missingTotpMessage=Please specify One-time code.
kcLabelWrapperClass=col-md-4
invalidFederatedIdentityActionMessage=An unexpected error has occurred or you are already logged into IDIR or BCeID and you need to logout or use a fresh browser to continue. Visit <a href="https://github.com/bcgov/sso-keycloak/wiki/Our-Partners-and-Useful-Information#common-login-errors">here</a> to learn more.
differentUserAuthenticated=You have an active session with a provider <span class="login-err-username"><{0}></span>. Please <a class="instruction-link" href="#">sign out</a> to proceed further.
differentUserAuthenticated=You have an active session with a provider <span class="login-err-username">''{0}''</span>. Please <a class="instruction-link" href="#">sign out</a> to proceed further.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ document.addEventListener('DOMContentLoaded', function (event) {
)[0].href = `${window.location.protocol}//${window.location.host}/auth/realms/standard/login-actions/restart?client_id=${pageURLQueryParamsObject?.client_id}&tab_id=${pageURLQueryParamsObject?.tab_id}`;

// Replace the username with the identity provider alias
const usernameRegex = /<[a-zA-Z0-9+=@&^#]+@([a-zA-Z0-9-]+)>/g;
const usernameRegex = /'[a-zA-Z0-9+=@&^#]+@([a-zA-Z0-9-]+)'/g;

const loginErrorString = document.getElementsByClassName('login-err-username')[0].innerText;

Expand Down

0 comments on commit b769a48

Please sign in to comment.