How use AuthPage for register with Next.JS?
I'm testing Refine and I wanted to use next.js and mantine to plug a frontend to supabase. I'm trying to use the mantine registration page but the router cannot accept routes as it is file-based. Do you know how I can add the routes?
Disclaimer: I have little knowledge on React/Next but none on Mantine or Refine
10 Replies
ambitious-aqua•3y ago
Hey @kaizensparc you can use file based routing, it wont conflict with refine’s nextjs router
ambitious-aqua•3y ago
Check out this example https://refine.dev/docs/examples/next-js/
Ant Design | refine
refine allows you to build your SSR supported web applications using Next.js. With this example, you can see how to make a simple SSR supported CMS Admin panel using Ant Design.
ambitious-aqua•3y ago
We used refine’s router and custom pages in that one
flat-fuchsiaOP•3y ago
Hi 🙂 Is there somewhere in the example where it uses a registration page? I wanted to use refine-mantine AuthPage but I don't understand how 😅
I wanted to do something like
ambitious-aqua•3y ago
AuthPage should be name-imported rather than the default but other than that this looks good actually 😅
flat-fuchsiaOP•3y ago
Mmmh sorry I'm a newbie, what do you mean?
ambitious-aqua•3y ago
the import line should be
flat-fuchsiaOP•3y ago
Oh.
I guess I need to learn about that too 😅
Thank you, I didn't know there was a difference between those two
ambitious-aqua•3y ago
Let me come up with a basic example for you
using mantine + auth provider in next.js
Sorry, had some trouble with Stackblitz and Codesandbox 🤦♂️ Created a repo with Mantine + Next.js and added a dummy auth provider with register.
If you clone and run the app, you need to register an account first to be able to log in 🚀
https://github.com/aliemir/with-nextjs-mantine
flat-fuchsiaOP•3y ago
Oh thank you!