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

User creation not working #37

Open
kjoscha opened this issue Jan 13, 2021 · 1 comment
Open

User creation not working #37

kjoscha opened this issue Jan 13, 2021 · 1 comment

Comments

@kjoscha
Copy link

kjoscha commented Jan 13, 2021

I cannot create a new user via function Keycloak::Internal.create_simple_user(... as it is implemented in the demo app. I found out, that there is a problem with the code here:

      begin
        username.downcase!
        user = get_user_info(username, true, client_id, secret)
        new_user = false
      rescue Keycloak::UserLoginNotFound
        new_user = true
      rescue
        raise
      end

where the code does not run into the first rescue block. I could quickfix it with

     ...
      rescue Keycloak::UserLoginNotFound
        new_user = true
      rescue
        new_user = true # the explicit rescue handler above does not work
        #raise
      end

Can anybody confirm this bug?
I will dive deeper soon, since we need the gem urgently.

@theodor85
Copy link

theodor85 commented Oct 5, 2021

I have the same problem. I found that in this piece of code:

      def self.base_url
        Keycloak::Client.auth_server_url + "/admin/realms/#{Keycloak::Client.realm}/"
      end

wrong path was used. When I open my OpenID Endpoint Configuration, I see only paths like this:

http://{my_keycloak_host}/auth/realms/{my_realm_name}/protocol/openid-connect/userinfo

Do we have in new Keycloak versions a new structure of paths, maybe?

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

No branches or pull requests

2 participants