I love the prisma admin tool so far but one thing i'm trying to figure out is how to encrypt certain model attributes from the admin panel. Here is my datamodel.prisma
type User {
id: ID! @id
email: String @unique
password: String!
name: String!
role: Role! @default(value: USER)
posts: [Post]!
}
as you can see a user requires a password, but i dont want this password to be stored in plain text. I have resolvers setup so that when a user is created from the my api it encrypts the password using bcrypt. I'm wondering if it would be possible to have prisma deploy or generate hook into these resolvers so that a user created from the admin panel would have a usable password? or do you recommend that users have dummy non functioning passwords when created through the admin and then reset their password or something later?
I love the prisma admin tool so far but one thing i'm trying to figure out is how to encrypt certain model attributes from the admin panel. Here is my datamodel.prisma
as you can see a user requires a password, but i dont want this password to be stored in plain text. I have resolvers setup so that when a user is created from the my api it encrypts the password using bcrypt. I'm wondering if it would be possible to have
prisma deploy
orgenerate
hook into these resolvers so that a user created from the admin panel would have a usable password? or do you recommend that users have dummy non functioning passwords when created through the admin and then reset their password or something later?