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

Docs: Add demo for adding OAuth support from Google #812

Open
JerePlum99 opened this issue Feb 19, 2025 · 2 comments
Open

Docs: Add demo for adding OAuth support from Google #812

JerePlum99 opened this issue Feb 19, 2025 · 2 comments

Comments

@JerePlum99
Copy link

First off - really appreciate the package. I'm a solo data engineer hoping to move an internal company chat-interface to a more flexible frontend, and this seems like the most actively developed OSS.

I'm fine with all dependencies, but have really struggled how to easily integrate Google Oauth by simply adding the provider with NextAuth - I'm pretty new to Typescript and for some reason this has proven more difficult than Supabase or Clerk.

Would it be possible to add a brief page to docs/ that depicts how to add Oauth and optionally remove other login/registration functionality.

By doing this, it would provide a simple 1-click deploy starting point for internal company chat applications that place all authentication on Google (and domain restrictions if provided).

@JerePlum99 JerePlum99 changed the title Docs: Add demo to add Oauth support for Google Docs: Add demo for adding OAuth support from Google Feb 19, 2025
@athrael-soju
Copy link

athrael-soju commented Feb 21, 2025

@JerePlum99 This shoud do the trick: athrael-soju#14

I haven't raised a PR on this repo yet, because I haven't had the time to tidy it up. I picked up some of this code from here: #717, which was closed last month.

Just replace the github provider with google and set your redirects as expected and it should work fine. You may need to re-create your db schema, since sso providers don't provide a password.

@JerePlum99
Copy link
Author

@athrael-soju This worked great btw - appreciate the help. If I have time later this week I'll try to frame this as an actual doc and submit a PR.

I need to take a look at the changes but would be very worthwhile to figure out how to format the db schemas to support Oauth more out-of-the-box.

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

2 participants