-->

Keycloak - direct user link registration

2020-07-11 07:06发布

问题:

I have set up a web application with Keycloak in my local machine. Since Im using Keycloak as SSO implementation, I want in my web app that whenever SIGNUP button is click, user is directed into the registration page, and not going through the LOGIN page.

This is the example URL directed to the registration form, however, it contains a tab_id that is generated randomly like a session id.

https://site.test/auth/realms/custom/login-actions/authenticate?client_id=test&tab_id=qIdW92Bvwmk

I read about this link

Yes, as long as you use the "registrations" instead of "auth" in the end of login ( AuthorizationEndpoint ) URL

But my endpoint in https://site.test/auth/realms/custom/.well-known/openid-configuration cannot be modified.

回答1:

You can change the button link to this format -

http://<domain.com>/auth/realms/<realm-name>/protocol/openid-connect/registrations?client_id=<client_id>&response_type=code&scope=openid email&redirect_uri=http://<domain.com>/<redirect-path>&kc_locale=<two-digit-lang-code>