-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add next-auth using a custom session strategy #8582
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
585b0b6 to
afedf9d
Compare
42662fb to
6df3dd6
Compare
80f95ec to
82c4f2e
Compare
c59e7e5 to
5e6c3ee
Compare
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.
Awesome!
I think we should show how you might use the session returned, for example with GitHub my session object was the following:
session: {
user: {
name: 'Daniel Cousens',
email: undefined,
image: 'https://avatars.githubusercontent.com/u/413395?v=4'
},
expires: '2023-06-30T00:12:34.567Z'
}|
would it make sense to merge this session info with actual user in keystone and present compatible keystone session? This session is also useful and may represent fresh from provider without matching user in database then we can redirect them to complete signup page and either link account or complete signup, for example having user provide missing email. |
|
Thanks for the feedback @dcousens and @gautamsi
The reason I started with just a |
33f4ad6 to
3f293b0
Compare
38abc43 to
685b03a
Compare
2d3527d to
15772f2
Compare
ab04361 to
023a316
Compare
This new example shows what it might look like to implement next-auth with Keystone without the use of an external package. Given https://github.com/OpenSaasAU/keystone-nextjs-auth is no longer working with later versions of next-auth I wanted to see/get feedback on using next-auth directly instead of potentially rearchitecting the package for the upcoming
next-auth@5release.