Skip to content

Commit

Permalink
fix: regex to handle hypens inside provider names
Browse files Browse the repository at this point in the history
  • Loading branch information
NithinKuruba committed Jun 26, 2024
1 parent f8fa146 commit 0b676b8
Showing 1 changed file with 1 addition and 1 deletion.
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 = /<[\w\d]+@(\w+)>/g;
const usernameRegex = /<[\w\d]+@([a-zA-Z0-9-]+)>/g;

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

Expand Down

0 comments on commit 0b676b8

Please sign in to comment.