JS adapter custom parameters

Hi everyone.

I’m using js adapter to authorize clients on frontend side.

I need to pass custom parameter during authorization process:
https://ip:port/auth/realms/realm_name/protocol/openid-connect/auth?client_id=client_id&redirect_uri=redirect_uri&state=123&response_mode=fragment&response_type=code&scope=openid&nonce=345 &custom_parameter=custom_parameter_value

Do we have any way to do it?

Are you trying to get the custom parameter passed to your redirect URI or to be used by a custom Authenticator?

parameter will be used by keycloak server. depends on it I’m going to select login theme.

Hey did you found a way to solve this?

Hi @Bricev The best way to solve this problem I found:
Use the keycloak.login({ scope: [<your_custom_scopes>] }) function and then check if this scope exists in the custom theme selector. hope it will help you.

1 Like