Nerzal / gocloak

golang keycloak client
Apache License 2.0
1.01k stars 275 forks source link

First time login failing for user with temporary password #437

Open SaiTejaSuvvari opened 1 year ago

SaiTejaSuvvari commented 1 year ago

Describe the bug First time login failing for user with temporary password

To Reproduce Steps to reproduce the behaviour:

  1. Create a user with temporary password: using CreateUser
  2. Try Login for the user with the temporary password
  3. Returns error: 400 Bad Request: invalid_grant: Account is not fully set up

Expected behaviour Login must work for the first time

Nerzal commented 1 year ago

Is the user enabled after the CreateUser Call?

SaiTejaSuvvari commented 1 year ago

Is the user enabled after the CreateUser Call?

Yup, the user is enabled when creating the user for the first time.

dlgeraghty commented 1 year ago

You must change the password to get rid of the "Account is not fully set up" problem. This happens because the password is temporary, you are forced to change it and cannot obtain an access token without doing it