How can I authenticate using prismaclient? #1917
-
Hi Everyone I've been following this tutorial here: https://github.com/prisma/prisma-examples/tree/master/typescript/graphql-nextjs to bootstrap things and using the SignupMutation to create some new user. But the question is how can I authenticate the user using Prisma client? I've tried this tutorial before but https://www.prisma.io/tutorials/authentication-in-apollo-server-ct21 But this tutorial needs to set up your own database and I don't want to, that's why I've started to use Prisma client, they provide to me one DB inside the file First time using Prisma and would like some help, thanks, everybody! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @yuripramos 👋🏼, I suggest you look at the GraphQL example with authentication. To implement authentication with Prisma, you generally use Prisma to store and get permissions from the database. The actual authentication logic is either handled by you in the request handler, the framework, or a plugin like https://github.com/maticzav/graphql-shield. |
Beta Was this translation helpful? Give feedback.
-
I've solved this problem creating 2 tsconfig files one |
Beta Was this translation helpful? Give feedback.
Hey @yuripramos 👋🏼,
I suggest you look at the GraphQL example with authentication.
To implement authentication with Prisma, you generally use Prisma to store and get permissions from the database. The actual authentication logic is either handled by you in the request handler, the framework, or a plugin like https://github.com/maticzav/graphql-shield.