Extending AuthPage
Anyone have any suggestions on how to extend the AuthPage's RegisterPage to include additional input fields?
14 Replies
genetic-orange•2y ago
I guess you have to create your own authpage with registration and login page.
genetic-orange•2y ago
You can find more details on https://refine.dev/docs/api-reference/core/components/auth-page/
| refine
component from refine is a authentication page that can be used to login, register, forgot password and update password.
genetic-orange•2y ago
This is refines core AuthPage. You can create your own same as above and update only the
RegisterPage
as you desire. And use it in the Refine component LoginPage
as
sensitive-blue•2y ago
Womp womp
Ya I tried to copy the core auth page but there were some errors (maybe some typing error)
Could you share error details?
sensitive-blue•2y ago
https://github.com/refinedev/refine/blob/next/packages/mui/src/components/pages/auth/components/login/index.tsx#L47
Can you check the package you imported useForm?
GitHub
refine/index.tsx at next · refinedev/refine
Build your React-based CRUD applications, without constraints. - refine/index.tsx at next · refinedev/refine
sensitive-blue•2y ago
same as the register component:
Hmm. Could you share StackBlitz env?
sensitive-blue•2y ago
Steven
StackBlitz
Refine Mui Example (forked) - StackBlitz
Run official live example code for Refine Mui, created by Refinedev on StackBlitz
Thanks ⚡️ We will look at it tomorrow
genetic-orange•2y ago
Hey @geekdev,
useFormProps
is compatible with useForm
from the @pankod/refine-core
package so you have to pass the useFormProps
to refineCoreProps
for @pankod/refine-react-hook-form
package like below:
sensitive-blue•2y ago
Ahh thanks! I see what I did wrong now. I imported from the wrong package. I should done like https://github.com/refinedev/refine/blob/ef3122b79d008d7fe4b85d6a1e5a1441e3cdeb75/packages/mui/src/components/pages/auth/index.tsx#L4:
thanks for catching that!
genetic-orange•2y ago
Nice to hear that! But you are right there is a little conflict. We’ll disscuss the case with team tomorrow. 🙏🏼