Replies: 1 comment 1 reply
-
|
You can do it like this: import {SecurePassword} from 'blitz'
import db from 'db'
const hashedPassword = await SecurePassword.hash(password)
const user = await db.user.create({
data: {email: 'user@example.com', hashedPassword},
})the hashedPassword is different on each run, even for the same password, for security reasons. See the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I understand that the password uses a secret environment variable, however between 2 password resets, the hashed password is different. I tried to base64 decode it, and there is some binary data which I cannot understand. Can someone explain how can I set my password in seeds.ts?
Beta Was this translation helpful? Give feedback.
All reactions