rapid-river-3747
02/10/2025, 2:44 PMbrief-egg-61061
02/10/2025, 2:44 PMbrief-egg-61061
02/10/2025, 2:45 PMcredentials.password.config.hashed_password
field of the request body. This is the proper way to import hashed passwords into Ory. 3. If your current hashing algorithm is not supported or you can't access the hashed passwords, Ory offers a "graceful" migration option using a password migration hook. This is configured by setting use_password_migration_hook
to true
in the identity creation or update payload. Here's an example of how to properly import a hashed password when creating an identity: json { "schema_id": "<preset://email>", "traits": { "email": "<mailto:user@example.com|user@example.com>" }, "credentials": { "password": { "config": { "hashed_password": "$2a$10$ZsCsoVQ3xfBG/K2z2XpBf.tm90GZmtOqtqWcB5.pYd5Eq8y7RlDyq" } } } }
It's important to use Ory's built-in methods for password management to ensure security and proper integration with Ory's authentication system. Storing passwords (even hashed) in user traits or admin identities would bypass Ory's security measures and is not recommended. For more detailed information on importing identities and credentials, you can refer to the [Import identities documentation](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities).