I’m submitting a…
- Regression (a behavior that stopped working in a new release)
- [v] Bug report
- Performance issue
- Documentation issue or request
Current behavior
When external OIDC enabled there is no way to pass single “openid” scope to external identity server. By default there will be at least “openid” and “profile” scopes passed. But the issue in our case is that our identity server didn’t setup to process “profile” scope. The only way for us now is to fork Squidex and develop workaround to be able to pass only single “openid” scope to identity server. In the snippet below there always will be scopes “openid” and “profile” as a options.Scope
and no way to remove “profile” scope. That’s all because of the implementation that have hardcoded Scope values as:
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions
Scope.Add("openid");
Scope.Add("profile");
Our identity server /.well-known/openid-configuration
...
"scopes_supported": [
"offline_access",
"offline",
"openid"
],
...
Expected behavior
We would like to be able to disable other than “openid” default scopes or override default scopes. In case of first option we will have to do something like in our fork for squidex/backend/src/Squidex/Config/Authentication/OidcServices.cs at master · Squidex/squidex · GitHub
...
authBuilder.AddOpenIdConnect(Constants.ExternalScheme, displayName, options =>
{
options.Scope.Clear();
options.Scope.Add(OpenIddict.Abstractions.OpenIddictConstants.Scopes.OpenId);
...
Minimal reproduction of the problem
Run Squidex locally and setup any external OIDC with supported scopes as
...
"scopes_supported": [
"offline_access",
"offline",
"openid"
],
...
Environment
- Self hosted with docker
- Self hosted with IIS
- [v] Self hosted with other version
- Cloud version
Version: [VERSION]
Browser:
- [v] Chrome (desktop)
- Chrome (Android)
- Chrome (iOS)
- Firefox
- Safari (desktop)
- Safari (iOS)
- IE
- Edge
Others:
error: invalid_scope
error_description: The requested scope is invalid, unknown, or malformed. The OAuth 2.0 Client is not allowed to request scope 'profile'.