WisnuPramW
ZITADEL6mo ago
2 replies
WisnuPram

Login create session only available with username not email

I have created new custom login and use API for authentication. At first, I try the create session API with the username and password. It succeded.

However when I use the email and password, it shows user not found.
{
  "checks": {
    "user": {
      "loginName": "<<Email>>@gmail.com"
    },
    "password": {
      "password": "<<USER_PASSWORD>>"
    }
  },
  "lifetime": "18000s"
}

{
  "code": 5,
  "details": [
    {
      "@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
      "id": "QUERY-Dfbg2",
      "message": "User could not be found"
    }
  ]
}

I tried to use login directly with Zitadel in console UI, it works with username+password and email+password. Is there anything I might do it wrong here?
image.png
Was this page helpful?