Open
Conversation
…devx/bresearch into createResearchedTransaction
joseph082
reviewed
May 24, 2024
| const token = await getToken({ req, secret: process.env.NEXTAUTH_SECRET }); | ||
| if (!token) { | ||
| const signInPage = '/api/auth/signin'; | ||
| const signInPage = '/login'; |
Collaborator
There was a problem hiding this comment.
Try moving this to globals.js
joseph082
reviewed
May 31, 2024
| <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'> |
Collaborator
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a custom login page with Google OAuth