-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login page #205
base: main
Are you sure you want to change the base?
Login page #205
Conversation
…devx/bresearch into createResearchedTransaction
return NextResponse.next(); | ||
} | ||
const token = await getToken({ req, secret: process.env.NEXTAUTH_SECRET }); | ||
if (!token) { | ||
const signInPage = '/api/auth/signin'; | ||
const signInPage = '/login'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try moving this to globals.js
<center> | ||
<h1 className="text-2xl font-bold mt-0 rounded-sm py-1 px-1 text-blue-800"> | ||
<div key="google"> | ||
<button onClick={ () => signIn('google', { callbackUrl: "/" }) } className='border-blue-800 border-solid border-2 p-5 rounded-lg'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This forces users to go to the main page after logging in.
Maybe getting rid of callbackUrl will fix it: https://next-auth.js.org/getting-started/client#specifying-a-callbackurl Or try to read the query parameter from http://localhost:3000/login?callbackUrl=%2F and pass that into here. Or there might be another way
Added a custom login page with Google OAuth