Using Refine with Prisma and next-auth #1812
-
Hi This package certainly looks promising. Pl. consider this use case.. A company is looking for a
should have
My questions: a. If I want to write this single UI panel using Next.Js, I need to use the Refine's Next.js router. Am I right? b. To save the data entered using the admin panel, use the Refine's db provider. Do I need to write a DB provider of my own if I want to use b. When I need to pull the content i.e. images and rich text and feed it to a d. What do you mean when you said this:
Does this mean one cannot replace What limitations does Refine place for API networking and AuthN / AuthZ? Won't it allow me to use next-auth like library for the UI panel that I want to write using Nextjs? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I am reading the tutorials. Looks like, Refine does not seem to fit well in a scenario where someone wants to use Prisma and next-auth. |
Beta Was this translation helpful? Give feedback.
-
Hey @asynchor 👋, a. Yes, You should use the I hope it will be useful for you 🚀 |
Beta Was this translation helpful? Give feedback.
-
Hi @omeraplak Thanks for the clarification. react-query is the best. I just asked about it to clarify the point stated in the documentation .. I will have a look at the links you have shared. |
Beta Was this translation helpful? Give feedback.
-
Would be interested in use with Next-Auth |
Beta Was this translation helpful? Give feedback.
Hey @asynchor 👋,
Thank you for contacting us!
a. Yes, You should use the
@pankod/refine-nextjs-router
package in Next.js projectsb. You can use it by adding a REST or GraphQL API layer in front of Prisma (I found a Prisma provider written for
react-admin
, maybe it can give you an idea, https://github.com/codeledge/ra-data-simple-prisma)c. You can use it as it is done in Refine's finefoods client. You can prefer SSG over SSR, https://github.com/pankod/refine/blob/master/examples/fineFoods/client/pages/index.tsx#L109
d. It is not possible to change the state management. The only way would be to move forward with a fork. I think you can use
next-auth
with refine but we haven't tried it. If…