Nextauth login page
Unanswered
! nolikas posted this in #help-forum
Is there any way for me to modify this next-auth premade login page? I don't have this page in my code, but when I click on button with next-auth's function
signIn() I get redirected to it. I'm using next-auth with next-auth-steam.18 Replies
Use signIn('steam') to skip this. I think you can also specify your own custom login page through the pages config of next auth
@! nolikas Is there any way for me to modify this next-auth premade login page? I don't have this page in my code, but when I click on button with next-auth's function `signIn()` I get redirected to it. I'm using `next-auth` with `next-auth-steam`.
Carolina Dog
Yes you can.
You create a custom page for sign in (e.g. in /auth/sign-in). Then you can configure pages property in next auth options. For more information read https://next-auth.js.org/configuration/pages.
You create a custom page for sign in (e.g. in /auth/sign-in). Then you can configure pages property in next auth options. For more information read https://next-auth.js.org/configuration/pages.
@Carolina Dog Yes you can.
You create a custom page for sign in (e.g. in /auth/sign-in). Then you can configure pages property in next auth options. For more information read https://next-auth.js.org/configuration/pages.
Wow, I actually had done it in the back but it was some time ago, just forgot it 😄
Thanks for the help â¤ï¸
Okay, I got the custom page up, but how do I configure the redirect url for the button?
@! nolikas Okay, I got the custom page up, but how do I configure the redirect url for the button?
signIn('steam', { callbackUrl: "/" })like this i think
do you get redirect if just using
signIn('steam')?just removed he callbackurl and everything is fine now
does it redirect you to "/"?
I click on the auth button and I instantly get taken to steam auth
ah ok by default it will redirect to "/"
No by default it will send you back to the page you started the login on
Yeah, I modified it after some time so it redirects to /