Skip to content
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

Support for prompt=create in keycloak.js #6

Open
mposolda opened this issue Dec 20, 2024 · 2 comments · May be fixed by keycloak/keycloak#36632
Open

Support for prompt=create in keycloak.js #6

mposolda opened this issue Dec 20, 2024 · 2 comments · May be fixed by keycloak/keycloak#36632
Assignees

Comments

@mposolda
Copy link
Contributor

mposolda commented Dec 20, 2024

Description

There was this functionality added in Keycloak 26.1 keycloak/keycloak#10701 . It is standard way how can client notify Keycloak that it wants to open user registrations screen rather than login screen .

The keycloak.js supports the functionality by the proprietary registrations endpoint https://github.com/keycloak/keycloak/blob/26.0.7/js/libs/keycloak-js/lib/keycloak.js#L839 . But the endpoint is now deprecated. It can be nice to update this to use prompt=create instead of registrations endpoint, so we can eventually remove the endpoint in Keycloak 27 ( keycloak/keycloak#36084 ) without keycloak.js being broken.

At the same time, it can be nice if we keep the support for registrations endpoint for the cases when keycloak.js is used with older Keycloak server versions than 26.1. Not sure if there is a mechanism in keycloak.js to detect server version or if it needs to be some configuration option in keycloak.js to specify which way to use (prompt=create VS registrations endpoint)?

Discussion

No response

Motivation

No response

Details

No response

@jonkoops
Copy link
Contributor

We can probably use the .well-known/openid-configuration endpoint to make sure this remains backwards compatible.

@mposolda
Copy link
Contributor Author

@jonkoops +1 . It has option prompt_values_supported, which is now returned in the well-known endpoint response. But this property prompt_values_supported was recently added (also in Keycloak 26.1 in the same commit like the prompt=create) .

So if the prompt_values_supported exists and contains create, we know that prompt=create is supported. Otherwise we know that we need to stick with the legacy endpooint.

@mposolda mposolda self-assigned this Jan 15, 2025
mposolda referenced this issue in mposolda/keycloak Jan 21, 2025
closes #36085

Signed-off-by: mposolda <[email protected]>
mposolda referenced this issue in mposolda/keycloak Jan 23, 2025
closes #36085

Signed-off-by: mposolda <[email protected]>
mposolda referenced this issue in mposolda/keycloak Jan 24, 2025
closes #36085

Signed-off-by: mposolda <[email protected]>
@jonkoops jonkoops transferred this issue from keycloak/keycloak Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants