File tree Expand file tree Collapse file tree
auth0/src/api/features/Auth0Idp
cognito/src/api/features/CognitoIdp
okta/src/api/features/OktaIdp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Auth0IdpProviderFactoryImpl implements IdpProviderFactory.Interface {
1919 return false ;
2020 }
2121
22- return new URL ( issuer ) . hostname . includes ( " auth0.com") ?? false ;
22+ return new URL ( issuer ) . hostname . endsWith ( ". auth0.com") ?? false ;
2323 }
2424 } ,
2525 jwksCache
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ class CognitoIdpProviderFactoryImpl implements IdpProviderFactory.Interface {
1313 const clientId = String ( process . env . COGNITO_CLIENT_ID ) ;
1414
1515 // Cognito issuer format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}
16- const issuer = `https://cognito-idp.${ region } .amazonaws.com/${ userPoolId } ` ;
16+ const expectedIssuer = `https://cognito-idp.${ region } .amazonaws.com/${ userPoolId } ` ;
1717
1818 return new OidcIdpProvider (
1919 {
20- issuer,
20+ issuer : expectedIssuer ,
2121 clientId,
2222 config : this . config ,
2323 isApplicable : ( token : JwtPayload ) => {
@@ -26,12 +26,7 @@ class CognitoIdpProviderFactoryImpl implements IdpProviderFactory.Interface {
2626 return false ;
2727 }
2828
29- const url = new URL ( issuer ) ;
30-
31- return (
32- url . hostname . includes ( "cognito-idp" ) ||
33- url . hostname . includes ( "amazonaws.com" )
34- ) ;
29+ return issuer === expectedIssuer ;
3530 }
3631 } ,
3732 jwksCache
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class OktaIdpProviderFactoryImpl implements IdpProviderFactory.Interface {
1919 return false ;
2020 }
2121
22- return new URL ( issuer ) . hostname . includes ( " okta.com") ?? false ;
22+ return new URL ( issuer ) . hostname . endsWith ( ". okta.com") ?? false ;
2323 }
2424 } ,
2525 jwksCache
You can’t perform that action at this time.
0 commit comments