R
Refine

ask-any-question

How use AuthPage for register with Next.JS?

Ddeep-jade1/10/2023
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
Ffascinating-indigo1/10/2023
Hey @kaizensparc you can use file based routing, it wont conflict with refine’s nextjs router
Ffascinating-indigo1/10/2023
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.
Ffascinating-indigo1/10/2023
We used refine’s router and custom pages in that one
Ddeep-jade1/10/2023
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
import AuthPage from "@pankod/refine-mantine";

function Register() {
return <AuthPage type="register" />
}
export default Register;
import AuthPage from "@pankod/refine-mantine";

function Register() {
return <AuthPage type="register" />
}
export default Register;
Ffascinating-indigo1/10/2023
AuthPage should be name-imported rather than the default but other than that this looks good actually πŸ˜…
Ddeep-jade1/10/2023
Mmmh sorry I'm a newbie, what do you mean?
Ffascinating-indigo1/10/2023
the import line should be
import { AuthPage } from "@pankod/refine-mantine";
import { AuthPage } from "@pankod/refine-mantine";
Ddeep-jade1/10/2023
Oh. I guess I need to learn about that too πŸ˜… Thank you, I didn't know there was a difference between those two
Ffascinating-indigo1/10/2023
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
Ddeep-jade1/11/2023
Oh thank you!

Looking for more? Join the community!

R
Refine

ask-any-question

Join Server
Recommended Posts
Invalidating resource does not put dataGrid into loading stateHello! I'm implementing a DataGrid with ability to reorder rows. Every time table gets reordered I tChange pagination methodHello everybody, I am trying to implement pagination with a datagrid, but my API do not use "_start"Using Refine ExampleHello, everyone. I am new to refine and this discord server as well. I just needed help regarding rPut request instead of Patch when using <SaveButton>Hi Guys! I want to send put request in ...Edit.tsx page instead of patch request. Is there any shortRefine platform is great However didRefine platform is great. However, did somebody use useInfiniteQuery? If useInfiniteQuery is not in Error with peer dependencies during pipelineHello! πŸ™‚ I'm having a problem during pipeline with the peer deps refine wants.. I've just upgraded custom graphql query to fetch data from the backendHere is my custom graphql query --- const UNITS_AGGREGATE = gql`query { organizations { id switch is not getting checked when formitem value is trueI have an edit form . in that there switch inside form.Item so when that formitem is true it shouldHow to translate antd validation message?Hi, I've set the i18n locale to Chinese, using the code below: ```ts i18n .use(Backend) .use(iniHow to use json-schema form builder in Refine?Hi, I am new to Refine. I am trying to build a dynamic form using json . Is there any example for thHow do I pass an authorization header to @pankod/refine-simple-rest for API callsHello I am trying to use the @pankod/refine-simple-rest data provider, and the API endpoint requireuser authorization within getUserIdentityI'd like to check user's role before I let him use ADMIN page. My API returns accessToken only when and step formhow to access form.item values which are in stepform in antd formprops.onFinishuseCustomMutation doesn't lead into AuthProvider checkAuth and checkErrorwhen using useCustomMutation, it doesn't lead into checkError or even checkAuth. Is this normal? andReducing bundle sizeThe bundle size of my Refine app built with Next.js and Material UI is very high and the app is veryFinefoods Admin Dashboard ExampleI got a question regarding one of the examples. The finefoods Ant design admin panel. On the ordersclose sideris there any way to close sider programmatically?How to create a multi-select control for resources with Antd?I'm trying to build a select list which it can select multiple related resources (with Strapi v4 relHow to call database function in supabase?I have created a supbase database function and want to call from refine app, how can I do that? Is tMultiple select for nested objects with IDsHi everyone. I'm trying to build a `Form.Item` with a Select inside for multiple related objects. My