How to generate a direct login url

I am trying to generate a url with with specific user information(i.e access token) and a redirect_uri which will log that specific user in keycloak in browser and then redirect back to the redirect_uri. My use case is we have an app that does the sign up of new user in the app with necessary information. We take the information and create users in keycloak through api. Now for the first login after signup I don’t want to redirect user to keycloak login page and have them enter the username and password again which they just did in the last step. Is there a way to achieve that?
Thanks a bunch!

1 Like


Did you find a way to do it? I’m struggling with it for a while already.


There is a redirect_uri paratemeter on some of the admin API calls, but I think those only redirect you after you create a session. I don’t know of any built-in way to give a user a session upon creation, but you could probably write a custom SPI to do that. See the keycloak developer docs for more on that, I don’t know much about writing custom SPIs.