Skip to content

Commit

Permalink
fix(msha): change auth regex for unsupported providers to allow provi…
Browse files Browse the repository at this point in the history
…ders with numbers

Fix regression from #844 within the 2.x release and applies the same partial fix in #895 in the other code path.
This is to support providers such as Azure AD B2C or Auth0, which usually would be using 'aadb2c' or 'auth0'.
  • Loading branch information
jstoker authored Mar 6, 2025
1 parent 062fb28 commit e841583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/msha/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function getAuthPaths(isCustomAuth: boolean): Path[] {
paths.push({
method: "GET",
// For providers with custom auth support not implemented, revert to old behavior
route: /^\/\.auth\/login\/(?<provider>twitter|[a-z]+)(\?.*)?$/i,
route: /^\/\.auth\/login\/(?<provider>twitter|[a-z0-9]+)(\?.*)?$/i,
function: "auth-login-provider",
});
paths.push({
Expand Down

0 comments on commit e841583

Please sign in to comment.