Skip to content
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

Github login not working for some users using new DrizzleORM setup #412

Open
mdichtler opened this issue Jun 19, 2024 · 2 comments
Open

Comments

@mdichtler
Copy link

As the email is set to notNull for compatibility with NextAuth adapter, some Github users might not be able to login due to a setting on their profile: Keep my email addresses private - when checked Github returns null for the email, hence not allowing you to write to the model.

@leccles1
Copy link

leccles1 commented Jun 21, 2024

I had to update the permissions within the github app I created for authentication within settings -> developer settings -> my app -> Permissions. Once this was updated the email address started getting populated in the Auth response

This makes more sense to me, as even when dealing with 3rd party OAuth flows, 99% of the time I always request the email scope anyway.

@hamishll
Copy link

Just echoing this, I also had to add the email scope, would be great if we could add this step to the guide: https://vercel.com/guides/nextjs-multi-tenant-application
And also deprecate step 3 (publishing Prisma schema) now Drizzle is being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants