-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom OpenIdConnectProviders is broken in 1.1.8 #844
Comments
I'm also getting this with aadb2c auth. Downgrading to 1.1.7 fixes it. "auth": {
"identityProviders": {
"customOpenIdConnectProviders": {
"aadb2c": {
"registration": {
"clientIdSettingName": "AZURE_CLIENT_ID",
"clientCredential": {
"clientSecretSettingName": "AZURE_CLIENT_SECRET"
},
"openIdConnectConfiguration": {
"wellKnownOpenIdConfiguration": "https://tenant.b2clogin.com/tenant.onmicrosoft.com/B2C_1_sign_in/v2.0/.well-known/openid-configuration"
}
},
"login": {
"nameClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
"scopes": ["openid", "profile"],
"loginParameterNames": []
}
}
}
}
}, |
Edit to add: Another gotcha is that it can take an arbitrary amount of time for Azure to update their redirect caches. This may lead one to an hour of work trying to figure out what they did wrong because aadb2c will report If you use User Flows then for some reason running the "Test User Flow" clears up this issue and your new callbacks will work. /shrug I actually just ran in to this. This appears to be because of a difference in the expectations of the emulator's code and what the "documentation" suggest. This issue is that these regex only parse for if you change the name to something those ie:
|
@aoscodes I can confirm this as well. After the Downgrading to |
@aoscodes for reference to others who use
I believe previously b2c was part of the docs with the naming of "b2c" as a proposed way to configure the authentication. |
Can confirm that this still happens with 2.0.1. Custom identity providers with numerical names are not supported. Affected by regex here. Solution was to rename the connector name from |
various documented providers currently do not work with the local authorization emulator (e.g. auth0, aadb2c), because numbers are not captured in the regex Fixes Azure#844
various documented providers currently do not work with the local authorization emulator (e.g. auth0, aadb2c), because numbers are not captured in the regex Fixes Azure#844
Before filing this issue, please ensure you're using the latest CLI by running
swa --version
and comparing to the latest version on npm.Are you accessing the CLI from the default port
:4280
?--port
) and accessing the CLI from that port:4280
ℹ️ NOTE: Make sure to enable debug logs when running any
swa
commands using--verbose=silly
Describe the bug
When using custom identify providers with OpenID Connect, we should be able to login using the URL
/.auth/login/
Refer to docs: https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-custom?tabs=openid-connect%2Cinvitations#configure-a-custom-identity-provider
But since 1.1.8, when you login using that URL you get a 404 response.
Instead when you change the login URL to /.auth/login/customOpenIdConnectProviders, then it works. This is contrary to how the URL works in the cloud.
To Reproduce
Steps to reproduce the behavior:
staticwebapp.config.json
file with below content in it.swa start
Expected behavior
Should get the emulator login screen with the provider name as
aadb2c
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: