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 for our supported OAuth providers #134

Merged
merged 6 commits into from
Dec 10, 2024

Conversation

dowski
Copy link
Collaborator

@dowski dowski commented Dec 6, 2024

Includes detailed setup docs for GitHub, Google and Apple.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

vercel bot commented Dec 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
convex-auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 8:06pm

Copy link
Contributor

@thomasballinger thomasballinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love these OAuth guides, I'm inspired to use Apple oauth!

@@ -20,11 +20,21 @@
},
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
"dependencies": {
"@hookform/resolvers": "^3.9.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for components we aren't using?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be for the use of the shadcn/ui forms component that I tried but backed out - I'll remove it.

[Apple](oauth/apple) as OAuth providers. You can also try any of the 80 OAuth
providers bundled with Auth.js (see the list in the sidebar of
[Auth.js docs](https://authjs.dev/getting-started/providers/github)), but note
that **we don't provide support for using these other providers**.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clarity is great. If we hear from community members these are working we could link to guides on them.

Unlike other providers, Apple doesn't allow you to test your **Sign in with
Apple** integration using an app running on `localhost`. You'll need to fully
deploy your application to a public site with a valid SSL certificate.
{/* or setup a DNS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO for the future or easter egg for folks reading the docs? I like it, like a footnote only for people who read the source, but maybe stick it in parens instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha something that I meant to pull out but forgot - I think I pulled it out in a separate commit while you were reviewing.

Unfortunately you can't just map a DNS name to 127.0.0.1 - you also need SSL, and if someone wants that bad enough there are other guides out there for how to do it.

will be presented to users when they attempt to login with GitHub for your
application.

For the **Homepage URL**, use `http://localhost:5173`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this assuming Vite, should we add "or whatever your application uses," or mention 3000 if you use Next.js?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess I was assuming Vite here - but I'll add a note suggesting that users double check their port based on the framework they're using.

as the last argument to the following command (run in your terminal):

```
npx convex env set AUTH_GOOGLE_SECRET <yourgooglesecret>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a note that this can also be done in the dashboard somewhere?

Also v minor, but are there discriptive first few characters you could include in these, as a check for what a githubclientid or githubsecret looks like?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG, I'll mention something about the dashboard.

Re: characters, I'm not sure there's anything we can depend on. I have a few GH OAuth apps configured and the client IDs all start with Ov23li, but I'm not sure how that's generated. It's quite possible that it's not the case for others or something they'll change the future.

"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's tempting to avoid this whole shadcn components thing since what we need it so small but nice if we're adding more. We can always remove it later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use it in the auth example apps, but yeah, the use is pretty minimal. It's used in the example auth apps too.

Mostly some doc updates/clarification.
@dowski
Copy link
Collaborator Author

dowski commented Dec 10, 2024

Thanks for the review!

@dowski dowski merged commit 5557b1a into get-convex:main Dec 10, 2024
3 checks passed
@dowski dowski deleted the oauth-provider-docs branch December 10, 2024 20:30
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

Successfully merging this pull request may close these issues.

2 participants