docs: typo fixes

This commit is contained in:
Bereket Engida
2024-09-29 09:43:05 +03:00
parent ac5ae63987
commit b5f661beb2
15 changed files with 23 additions and 29 deletions

View File

@@ -41,7 +41,7 @@ Authentication in the TypeScript ecosystem is a half-solved problem. Other open-
### Goals
****
- **Be Comprehensive**: Save users from reinventing the wheel for anything related auth.
- **Be Comprehensive**: save users from reinventing the wheel as much as possible.
- **Prioritize Best Practices**: provide best practices rather than overwhelming configuration options.
- **Framework Agnostic**: Support most frameworks and avoid framework specific features and solutions if possible.
- **Consistency**: Provide a consistent and predictable API across all platforms

View File

@@ -5,7 +5,7 @@ export type Auth = {
provider: "sqlite";
url: "./db.sqlite";
};
socialProvider: [
socialProviders: [
{
id: "github";
},

View File

@@ -9,7 +9,7 @@ export const auth = betterAuth({
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: [
socialProviders: [
github({
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,

View File

@@ -5,7 +5,7 @@ export const auth = betterAuth({
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: {
socialProviders: {
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
},

View File

@@ -15,7 +15,7 @@ description: Apple
</Step>
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts" twoslash
const process = {
@@ -33,18 +33,12 @@ description: Apple
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: [ // [!code highlight]
socialProviders: { // [!code highlight]
apple({ // [!code highlight]
clientId: process.env.APPLE_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.APPLE_CLIENT_SECRET as string, // [!code highlight]
/** // [!code highlight]
* this is optional. // [!code highlight]
* only needed if you passed a custom basePath from `/api/auth` to `betterAuth` // [!code highlight]
* or if you're using a custom domain. // [!code highlight]
*/ // [!code highlight]
redirectURI: "https://example.com/api/auth/callback/apple", // [!code highlight]
}), // [!code highlight]
], // [!code highlight]
}, // [!code highlight]
})
```
</Step>

View File

@@ -11,7 +11,7 @@ description: Discord Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts"
import { betterAuth } from "better-auth"
@@ -22,7 +22,7 @@ description: Discord Provider
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: { // [!code highlight]
socialProviders: { // [!code highlight]
discord: { // [!code highlight]
clientId: process.env.DISCORD_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.DISCORD_CLIENT_SECRET as string, // [!code highlight]

View File

@@ -11,7 +11,7 @@ description: Facebook Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts" twoslash
const process = {
@@ -29,7 +29,7 @@ description: Facebook Provider
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: { // [!code highlight]
socialProviders: { // [!code highlight]
facebook: { // [!code highlight]
clientId: process.env.FACEBOOK_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.FACEBOOK_CLIENT_SECRET as string, // [!code highlight]

View File

@@ -11,7 +11,7 @@ description: Github Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts"
import { betterAuth } from "better-auth"

View File

@@ -11,7 +11,7 @@ description: Google Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts" twoslash
const process = {
@@ -29,7 +29,7 @@ description: Google Provider
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: { // [!code highlight]
socialProviders: { // [!code highlight]
google: { // [!code highlight]
clientId: process.env.GOOGLE_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string, // [!code highlight]

View File

@@ -11,7 +11,7 @@ description: Spotify Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts" twoslash
const process = {
@@ -29,7 +29,7 @@ description: Spotify Provider
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: { // [!code highlight]
socialProviders: { // [!code highlight]
spotify: { // [!code highlight]
clientId: process.env.SPOTIFY_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.SPOTIFY_CLIENT_SECRET as string, // [!code highlight]

View File

@@ -11,7 +11,7 @@ description: Twitch Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts" twoslash
const process = {
@@ -29,7 +29,7 @@ description: Twitch Provider
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: { // [!code highlight]
socialProviders: { // [!code highlight]
twitch: { // [!code highlight]
clientId: process.env.TWITCH_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.TWITCH_CLIENT_SECRET as string, // [!code highlight]

View File

@@ -11,7 +11,7 @@ description: Twitter Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProvider` option of the auth instance.
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts" twoslash
const process = {
@@ -29,7 +29,7 @@ description: Twitter Provider
provider: "sqlite",
url: "./db.sqlite",
},
socialProvider: {// [!code highlight]
socialProviders: {// [!code highlight]
twitter: { // [!code highlight]
clientId: process.env.TWITTER_CLIENT_ID, // [!code highlight]
clientSecret: process.env.TWITTER_CLIENT_SECRET, // [!code highlight]

View File

@@ -117,7 +117,7 @@ const handleSignIn = async () => {
## 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 `socialProvider` 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"
import { betterAuth } from "better-auth"

View File

@@ -133,7 +133,7 @@ export const auth = betterAuth({
emailAndPassword: { // [!code highlight]
enabled: true // [!code highlight]
}// [!code highlight]
socialProvider: { // [!code highlight]
socialProviders: { // [!code highlight]
github: { // [!code highlight]
clientId: process.env.GITHUB_CLIENT_ID, // [!code highlight]
clientSecret: process.env.GITHUB_CLIENT_SECRET, // [!code highlight]

View File

@@ -3,7 +3,7 @@ title: Introduction
description: Introduction to Better Auth.
---
Better Auth is framework-agnostic authentication (and authorization) library for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities with minimal code in short amount of time. Whether you need 2FA, multi-tenant support, or other complex features. It lets you focus on building your actual application instead of reinventing the wheel.
Better Auth is framework-agnostic authentication (and authorization) library for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities with minimal code with short amount of time. Whether you need 2FA, multi-tenant support, or other complex features. It lets you focus on building your actual application instead of reinventing the wheel.
## Why Better Auth?