<@U04UQ68083H> I am passing plain text password wh...
# ory-copilot
h
@chilly-king-10285 I am passing plain text password when i submit a login flow. Do I need encryption?
c
A message from kapa.ai
No, you don't need to encrypt the password when you submit a login flow. When you import a clear text password, you provide the password in the JSON payload. Ory will then hash the password according to the configured password hashing algorithm and store it in the database. Here is an example of how you can do this:
Copy code
json {    "schema_id": "<preset://email>",    "traits": {    "email": "[[email protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>)"    },    "credentials": {    "password": {    "config": {    "password": "the-password"    }    }    }   }
In this example, the password
the-password
will be hashed and stored in the database. The identity will be able to sign in using
[[email protected]](<https://www.ory.sh/cdn-cgi/l/email-protection>)
and
the-password
as credentials. Please note that password imports don't use any password validation. Users have to update their password according to the policy themselves using self-service flows. For more information, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities).