I am using keycloak together with my dotnet application to handle authentication - with Keycloak 18 I want to use dynamic scopes, and by that i also need to be able to change my scope values based on the current user and actions at runtime.
The use case is that a user by selecting some options add additional scopes that needs to be evaluated by keycloak at runtime, imagine that a user selects an app and a dynamic scope named app changes based on this app:<APP_ID> and then keycloak needs to evaluated the new scope, the user can at any time change this scope by interacting with the UI.
Currently my startup configures the authentication in AddOpenIdConnect with a number of default scopes, but i can't figure out how to dynamically change these scopes at runtime for the individual users.