mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-08 12:27:44 +00:00
chore: fix github capitalisation (#297)
This commit is contained in:
@@ -17,7 +17,7 @@ export function BetaNotice() {
|
|||||||
href="https://github.com/better-auth/better-auth/issues"
|
href="https://github.com/better-auth/better-auth/issues"
|
||||||
>
|
>
|
||||||
{" "}
|
{" "}
|
||||||
Github.
|
GitHub.
|
||||||
</Link>{" "}
|
</Link>{" "}
|
||||||
</Banner>
|
</Banner>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export default function Features({ stars }: { stars: string | null }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-left text-sm mt-2 text-muted-foreground">
|
<p className="text-left text-sm mt-2 text-muted-foreground">
|
||||||
Allow users to sign in with their accounts, including Github,
|
Allow users to sign in with their accounts, including GitHub,
|
||||||
Google, Discord, Twitter, and more.{" "}
|
Google, Discord, Twitter, and more.{" "}
|
||||||
<a className="text-gray-50" href="#" target="_blank">
|
<a className="text-gray-50" href="#" target="_blank">
|
||||||
Learn more
|
Learn more
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ export const contents: Content[] = [
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Github",
|
title: "GitHub",
|
||||||
href: "/docs/authentication/github",
|
href: "/docs/authentication/github",
|
||||||
icon: () => (
|
icon: () => (
|
||||||
<svg
|
<svg
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: Github
|
title: GitHub
|
||||||
description: Github Provider
|
description: GitHub Provider
|
||||||
---
|
---
|
||||||
|
|
||||||
<Steps>
|
<Steps>
|
||||||
<Step>
|
<Step>
|
||||||
### Get your Github credentials
|
### Get your GitHub credentials
|
||||||
To use Github sign in, you need a client ID and client secret. You can get them from the [Github Developer Portal](https://github.com/settings/developers).
|
To use GitHub sign in, you need a client ID and client secret. You can get them from the [GitHub Developer Portal](https://github.com/settings/developers).
|
||||||
|
|
||||||
Make sure to set the redirect URL to `http://localhost:3000/api/auth/callback/github` for local development. For production, you should set it to the URL of your application. If you change the base path of the auth routes, you should update the redirect URL accordingly.
|
Make sure to set the redirect URL to `http://localhost:3000/api/auth/callback/github` for local development. For production, you should set it to the URL of your application. If you change the base path of the auth routes, you should update the redirect URL accordingly.
|
||||||
</Step>
|
</Step>
|
||||||
@@ -29,8 +29,8 @@ description: Github Provider
|
|||||||
```
|
```
|
||||||
</Step>
|
</Step>
|
||||||
<Step>
|
<Step>
|
||||||
### Signin with Github
|
### Signin with GitHub
|
||||||
To signin with Github, you can use the `signIn.social` function provided by the client. The `signIn` function takes an object with the following properties:
|
To signin with GitHub, you can use the `signIn.social` function provided by the client. The `signIn` function takes an object with the following properties:
|
||||||
- `provider`: The provider to use. It should be set to `github`.
|
- `provider`: The provider to use. It should be set to `github`.
|
||||||
|
|
||||||
```ts title="client.ts"
|
```ts title="client.ts"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ description: Getting started with Better Auth
|
|||||||
Better Auth provides built-in authentication support for:
|
Better Auth provides built-in authentication support for:
|
||||||
|
|
||||||
- **Email and password**
|
- **Email and password**
|
||||||
- **Social provider (Google, Github, Apple, and more)**
|
- **Social provider (Google, GitHub, Apple, and more)**
|
||||||
|
|
||||||
<Callout>
|
<Callout>
|
||||||
You can extend authentication options using plugins, such as: Username-based login, Passkeys, Email magic links, and more.
|
You can extend authentication options using plugins, such as: Username-based login, Passkeys, Email magic links, and more.
|
||||||
@@ -128,7 +128,7 @@ const handleSignIn = async () => {
|
|||||||
|
|
||||||
## Social Sign-On
|
## Social Sign-On
|
||||||
|
|
||||||
Better Auth supports multiple social providers, including Google, Github, Apple, Discord, and more. To use a social provider, you need to configure the ones you need in the `socialProviders` option on your `auth` object.
|
Better Auth supports multiple social providers, including Google, GitHub, Apple, Discord, and more. To use a social provider, you need to configure the ones you need in the `socialProviders` option on your `auth` object.
|
||||||
|
|
||||||
```ts title="auth.ts"
|
```ts title="auth.ts"
|
||||||
import { betterAuth } from "better-auth"
|
import { betterAuth } from "better-auth"
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export function SignInCard() {
|
|||||||
d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
|
d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
|
||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
Continue with Github
|
Continue with GitHub
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
class="gap-2"
|
class="gap-2"
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ export function SignUpCard() {
|
|||||||
d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
|
d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2"
|
||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
Continue with Github
|
Continue with GitHub
|
||||||
</Button>
|
</Button>
|
||||||
<Button class="gap-2" variant="outline">
|
<Button class="gap-2" variant="outline">
|
||||||
<svg
|
<svg
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export default function SignInCard() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GitHubLogoIcon />
|
<GitHubLogoIcon />
|
||||||
Continue with Github
|
Continue with GitHub
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export function SignUp() {
|
|||||||
disabled={loading}
|
disabled={loading}
|
||||||
>
|
>
|
||||||
<GitHubLogoIcon />
|
<GitHubLogoIcon />
|
||||||
Continue with Github
|
Continue with GitHub
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const github = (options: GithubOptions) => {
|
|||||||
const tokenEndpoint = "https://github.com/login/oauth/access_token";
|
const tokenEndpoint = "https://github.com/login/oauth/access_token";
|
||||||
return {
|
return {
|
||||||
id: "github",
|
id: "github",
|
||||||
name: "Github",
|
name: "GitHub",
|
||||||
createAuthorizationURL({ state, scopes, codeVerifier, redirectURI }) {
|
createAuthorizationURL({ state, scopes, codeVerifier, redirectURI }) {
|
||||||
const _scopes = options.scope || scopes || ["user:email"];
|
const _scopes = options.scope || scopes || ["user:email"];
|
||||||
return createAuthorizationURL({
|
return createAuthorizationURL({
|
||||||
|
|||||||
Reference in New Issue
Block a user