You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.Adding a small Link Component on the Defualt Next Auth Page to Redirect to a Custom Register Page
2.Make it dynamic so that we can just use props from the options function and when clicked on the link, it redirects to the register page which is provided in the props as the path.
Non-Goals
Background
While working on a small Project I didnt want to build my Custom login page like this one from the ground up and what next-auth provides is much better for a beginner like me, as there is no provision of a any changes in HTML of that default login page
Proposal
What im proposing is an addition of a anchor tag which just redirects to a page, as a key Value pair inside the Credential provider Object (as a relative path) as that is the only Provider which needs a provision to register.
The changes can be made in the src/core/pages/signin.tsx where after the Button (Sign in with {provider.name}) a button/anchor tag can be added, which can take the path from the object as Provider.Path
The code can be changed as follows on the next-auth signin.tsx
The code on the client side while writing the auth options.jsx/tsx can be written as follows
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
1.Adding a small Link Component on the Defualt Next Auth Page to Redirect to a Custom Register Page

2.Make it dynamic so that we can just use props from the options function and when clicked on the link, it redirects to the register page which is provided in the props as the path.
Non-Goals
Background
While working on a small Project I didnt want to build my Custom login page like this one from the ground up and what next-auth provides is much better for a beginner like me, as there is no provision of a any changes in HTML of that default login page
Proposal
What im proposing is an addition of a anchor tag which just redirects to a page, as a key Value pair inside the Credential provider Object (as a relative path) as that is the only Provider which needs a provision to register.
The changes can be made in the src/core/pages/signin.tsx where after the Button (Sign in with {provider.name}) a button/anchor tag can be added, which can take the path from the object as Provider.Path
The code can be changed as follows on the next-auth signin.tsx
The code on the client side while writing the auth options.jsx/tsx can be written as follows
Beta Was this translation helpful? Give feedback.
All reactions