Hello, I would like to know how to manage the fact...
# talk-kratos
h
Hello, I would like to know how to manage the fact that a user registers with email password with Kratos, but then the email can not be used to log in but it is an identifier generated on the backend and communicated to the user. I see this as: adding after the register flow on the backend an identifier that would correspond to our id, the doc explains how to do this, what I need now is to know how to disable the email property so that the user can't login with it. I hope my question is clear enough! Thanks a lot for your help
m
Hey Lucas, you can specify in the identiy schema what is the identifier, in your case it would be what you create on the backend. something like the email + username combo could work I think:
Copy code
{
  "$id": "<https://example.com/registration.schema.json>",
  "$schema": "<http://json-schema.org/draft-07/schema#>",
  "title": "Person",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": false
              }
            }
          }
        },
        "username": {
          "type": "string",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            }
          }
        }
      }
    }
  }
}