add forgot-password to @pankod/refine-nextjs-router

The example in @pankod/refine-nextjs-router does not offer the forgot-password. Is it possible to add forgot-password similar to @pankod/refine-react-router-v6? Thank you.
E
exotic-emerald435d ago
Hi, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and found an answer! 🏆
Answer: It is possible to add forgot-password similar to @pankod/refine-react-router-v6. SOURCES: ./docs/api-reference/mui/components/auth-page.md

Note: If this is the answer you need, then we are very lucky. If not, please wait for someone from the refine core team or the community to try to help you.
M
metropolitan-bronze435d ago
Hey @maxdata, refine and router packages do not create auth pages manually. You need to create them yourself. For example in nextjs you can create a page like this: pages/forgot-password.tsx
import React from "react";
import { AuthPage } from "@pankod/refine-chakra-ui";

const ForgotPassword = () => {
return <AuthPage type="forgotPassword" />;
};

export default ForgotPassword;
import React from "react";
import { AuthPage } from "@pankod/refine-chakra-ui";

const ForgotPassword = () => {
return <AuthPage type="forgotPassword" />;
};

export default ForgotPassword;
R
ratty-blush435d ago
Hey @salihozdemir is it possible to move to /pages/auth/forgot-password.tsx. It seems like modifying the path in routerProvider does not work for next.js route. Thank you.
M
metropolitan-bronze435d ago
Yes, it’s possible. If you use nextjs, router provider doesn’t support custom pages. You can find more information here: https://refine.dev/docs/advanced-tutorials/ssr/nextjs/
Next.js | refine
refine can be used with Next.js to SSR your pages. It doesn't get in the way and follows Next.js conventions and also provides helper modules when necessary.
R
ratty-blush435d ago
Hey @salihozdemir do I need to create all the other auth pages if using next.js for example login, sign up, forgot password? It seems none of them are working default in next.js. How about "Send reset instructions" in "forgot password"? It seems not working in next.js as well. 😦
M
metropolitan-bronze435d ago
Yes, you need to create custkm pages whether nextjs or cra. It does no matter.
R
ratty-blush435d ago
Hey @salihozdemir After consideration, I have determined that React Query is a more suitable solution for the Refine platform. It offers better support by default and requires fewer lines of code to handle authentication, as demonstrated in this example: https://github.com/refinedev/refine/tree/master/examples/auth-chakra-ui. I have decided to switch from Next.js to React Query in Refine. Although Next.js has the advantage of pre-rendering, I believe I can still utilize caching in React Query? Thank you.
M
metropolitan-bronze435d ago
Nextjs is a react framework but react-query is a just library. So, we can’t compare each other. But, yo’re right react-query has so great featurues. If you develop a refine app you dont need to think about caching. Refine handles it for you🚀
R
ratty-blush435d ago
Yes. The Refine platform is so powerful and can accomplish a lot with just a few lines of code.
More Posts
Imported React Component Mangled (Leaflet )Hello, I am trying to use Leaflet to show a map where a lat/long is located, unfortunately it is notInferred List View Issues: (Realtime Support/Empty List)I followed the instructions here, https://refine.dev/docs/advanced-tutorials/data-provider/supabase/TypeError: Cannot convert undefined or null to objectI get this error always🔥Finefoods example: A lot of error at first startI just get finefoods example and try to start on my Mac. It started successfully but hundred warningFormatting error in inferencer SyntaxError: Declaration or statement expected. (100:21)I don't know what to do...Cannot display data from useTableTable with Ecologist is displaying correctly, but the other one with Applications is not, what is thI think .env is not working or im just missing something?Hey guys good day, I solved my problem just now about the Google log-in auth and it is good but I doCustom Form Submit AntdI want to trigger a custom endpoint but I can't do it properly. I use "useCustom" hook but as you knHow to mock useForm queryResult only?HI. Currently i have this code. Im mocking queryResult. ``` jest.mock('@pankod/refine-antd', () => An error occured while creating git commit.hey i runned the command for intsallation and it asked me ques and i ans but at the end i got error Authenticated Custom Pages vs resourcesHey all, I am continuing a web site using the "fine foods MUI theme" as base. The example already Unable to log into Refine. Whitescreen bugGreetings, I am in the process of working on my first project utilizing Refine and was following a tantd pagination size don't showHi, I realize if my table count not over 50, then pagesize changer does not show up. For example, inFigma integrationHow to change the return path of the CRUD Edit page?Hi, I'm using an Edit page for editing a resource (with Ant Design). However for this resource, I diremove spaces before submitHi everyone !! I try to modify a phone number to remove space before i send to the API. I get from aAntd Edit Page Don't send Id areaI updated my refine version and antd. Currently i use 3.99.4 refine version. I use edit page like thHow can I send an attribute other than data to the request in "onFinish"?(ant.design, strapi v4)I want to upload file(strapi v4 mediatype). Strapi V4 Example ``` //https://docs.strapi.io/develCan i implement useInfiniteList with useTable or useDataGrid?The api I am using in my custom data provider does not have a way get `total` which `useList` reqI created a form, and the <TextField /> sends only string, how can I do to send Number ?I create a model: https://codesandbox.io/s/dropdown-0lscxf?file=/src/pages/posts/CreatePostModal.tsx