From fc4c0eb280bee2465f45c2aab481e058f4f439a9 Mon Sep 17 00:00:00 2001 From: Anthony DePasquale Date: Sat, 12 Apr 2025 21:30:43 +0200 Subject: [PATCH] Better Auth --- demo/nextjs/app/page.tsx | 2 +- demo/nextjs/lib/email/reset-password.tsx | 2 +- docs/content/changelogs/1-2.mdx | 2 +- docs/content/docs/concepts/api.mdx | 2 +- docs/content/docs/concepts/hooks.mdx | 4 ++-- docs/content/docs/guides/browser-extension-guide.mdx | 12 ++++++------ .../content/docs/guides/supabase-migration-guide.mdx | 8 ++++---- docs/content/docs/integrations/expo.mdx | 2 +- docs/content/docs/integrations/express.mdx | 2 +- docs/content/docs/integrations/nitro.mdx | 2 +- examples/nuxt-example/pages/index.vue | 2 +- examples/svelte-kit-example/src/routes/+page.svelte | 2 +- packages/better-auth/src/types/options.ts | 8 ++++---- packages/cli/src/commands/init.ts | 2 +- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/demo/nextjs/app/page.tsx b/demo/nextjs/app/page.tsx index 21e11048fa..6d43ee519c 100644 --- a/demo/nextjs/app/page.tsx +++ b/demo/nextjs/app/page.tsx @@ -37,7 +37,7 @@ export default async function Home() {
- All features on this demo are Implemented with better auth + All features on this demo are implemented with Better Auth without any custom backend code
diff --git a/demo/nextjs/lib/email/reset-password.tsx b/demo/nextjs/lib/email/reset-password.tsx index 8fe61b74f8..808dd95a6b 100644 --- a/demo/nextjs/lib/email/reset-password.tsx +++ b/demo/nextjs/lib/email/reset-password.tsx @@ -22,7 +22,7 @@ export const ResetPasswordEmail = ({ username, resetLink, }: BetterAuthResetPasswordEmailProps) => { - const previewText = `Reset your BetterAuth password`; + const previewText = `Reset your Better Auth password`; return ( diff --git a/docs/content/changelogs/1-2.mdx b/docs/content/changelogs/1-2.mdx index 222b155da7..2410b1463d 100644 --- a/docs/content/changelogs/1-2.mdx +++ b/docs/content/changelogs/1-2.mdx @@ -101,7 +101,7 @@ Read the [Organization Plugin docs](/docs/plugins/organization#teams) for more i ### **Init CLI** -The CLI now includes an `init` command to add better auth to your project. +The CLI now includes an `init` command to add Better Auth to your project. ```bash title="terminal" npx @better-auth/cli init diff --git a/docs/content/docs/concepts/api.mdx b/docs/content/docs/concepts/api.mdx index 4991e63935..0dca57892e 100644 --- a/docs/content/docs/concepts/api.mdx +++ b/docs/content/docs/concepts/api.mdx @@ -3,7 +3,7 @@ title: API description: Better Auth API. --- -When you create a new Better Auth instance, it provides you with an `api` object. This object exposes every endpoint that exist in your better auth instance. And you can use this to interact with Better Auth server side. +When you create a new Better Auth instance, it provides you with an `api` object. This object exposes every endpoint that exist in your Better Auth instance. And you can use this to interact with Better Auth server side. Any endpoint added to Better Auth, whether from plugins or the core, will be accessible through the `api` object. diff --git a/docs/content/docs/concepts/hooks.mdx b/docs/content/docs/concepts/hooks.mdx index c51c406751..3ac632dcfa 100644 --- a/docs/content/docs/concepts/hooks.mdx +++ b/docs/content/docs/concepts/hooks.mdx @@ -6,7 +6,7 @@ description: Better Auth Hooks let you customize BetterAuth's behavior Hooks in Better Auth let you "hook into" the lifecycle and execute custom logic. They provide a way to customize Better Auth's behavior without writing a full plugin. -We highly recommend using hooks if you need to make custom adjustments to an endpoint rather than making another endpoint outside of better auth. +We highly recommend using hooks if you need to make custom adjustments to an endpoint rather than making another endpoint outside of Better Auth. ## Before Hooks @@ -227,7 +227,7 @@ The password object provider `hash` and `verify` #### Adapter -Adapter exposes the adapter methods used by better auth. Including `findOne`, `findMany`, `create`, `delete`, `update` and `updateMany`. You generally should use your actually `db` instance from your orm rather than this adapter. +Adapter exposes the adapter methods used by Better Auth. Including `findOne`, `findMany`, `create`, `delete`, `update` and `updateMany`. You generally should use your actually `db` instance from your orm rather than this adapter. #### Internal Adapter diff --git a/docs/content/docs/guides/browser-extension-guide.mdx b/docs/content/docs/guides/browser-extension-guide.mdx index 9848024e05..93bd00ff00 100644 --- a/docs/content/docs/guides/browser-extension-guide.mdx +++ b/docs/content/docs/guides/browser-extension-guide.mdx @@ -10,7 +10,7 @@ If you would like to view a completed example, you can check out the The Plasmo framework does not provide a backend for the browser extension. This guide assumes you have{" "} - a backend setup of BetterAuth and + a backend setup of Better Auth and are ready to create a browser extension to connect to it. @@ -25,7 +25,7 @@ If you would like to view a completed example, you can check out the ## Configure the manifest - We must ensure the extension knows the URL to the BetterAuth backend. + We must ensure the extension knows the URL to the Better Auth backend. Head to your package.json file, and add the following code. @@ -108,11 +108,11 @@ If you would like to view a completed example, you can check out the ## You're now ready! - You have now set up BetterAuth for your browser extension. + You have now set up Better Auth for your browser extension. Add your desired UI and create your dream extension! - To learn more about the client BetterAuth API, check out the client documentation. + To learn more about the client Better Auth API, check out the client documentation. Here’s a quick example 😎 @@ -195,7 +195,7 @@ If you would like to view a completed example, you can check out the Plasmo documentation to learn more about the framework. If you would like to view a completed example, you can check out the browser extension example. diff --git a/docs/content/docs/guides/supabase-migration-guide.mdx b/docs/content/docs/guides/supabase-migration-guide.mdx index f5565b611a..fce08639ab 100644 --- a/docs/content/docs/guides/supabase-migration-guide.mdx +++ b/docs/content/docs/guides/supabase-migration-guide.mdx @@ -125,7 +125,7 @@ This tables will be created on the `public` schema. ### Copy the migration script -Now that we have the necessary tables in our database, we can run the migration script to migrate the users and accounts from supabase to better auth. +Now that we have the necessary tables in our database, we can run the migration script to migrate the users and accounts from supabase to Better Auth. Start by creating a `.ts` file in your project. @@ -259,7 +259,7 @@ migrateFromSupabase(); ### Run the migration script -Run the migration script to migrate the users and accounts from supabase to better auth. +Run the migration script to migrate the users and accounts from supabase to Better Auth. ```bash title="Terminal" bun migration.ts # or use node, ts-node, etc. @@ -268,9 +268,9 @@ bun migration.ts # or use node, ts-node, etc. ### Update your code -Update your codebase from supabase auth calls to better auth api. +Update your codebase from supabase auth calls to Better Auth api. -Here's a list of the supabase auth api calls and their better auth counterparts. +Here's a list of the supabase auth api calls and their Better Auth counterparts. - `supabase.auth.signUp` -> `authClient.signUp.email` - `supabase.auth.signInWithPassword` -> `authClient.signIn.email` diff --git a/docs/content/docs/integrations/expo.mdx b/docs/content/docs/integrations/expo.mdx index dacec5754b..fde39fa661 100644 --- a/docs/content/docs/integrations/expo.mdx +++ b/docs/content/docs/integrations/expo.mdx @@ -126,7 +126,7 @@ Expo is a popular framework for building cross-platform apps with React Native. ## Configure Metro Bundler - To resolve better auth exports you'll need to enable `unstable_enablePackageExports` in your metro config. + To resolve Better Auth exports you'll need to enable `unstable_enablePackageExports` in your metro config. ```js title="metro.config.js" const { getDefaultConfig } = require("expo/metro-config"); diff --git a/docs/content/docs/integrations/express.mdx b/docs/content/docs/integrations/express.mdx index 9232d1309f..7d54af9489 100644 --- a/docs/content/docs/integrations/express.mdx +++ b/docs/content/docs/integrations/express.mdx @@ -73,7 +73,7 @@ Here's an example of how to use `getSession` in an Express route: ```ts title="server.ts" import { fromNodeHeaders } from "better-auth/node"; -import { auth } from "./auth"; //your better auth instance +import { auth } from "./auth"; // Your Better Auth instance app.get("/api/me", async (req, res) => { const session = await auth.api.getSession({ diff --git a/docs/content/docs/integrations/nitro.mdx b/docs/content/docs/integrations/nitro.mdx index 036576a92b..5a7e1cad38 100644 --- a/docs/content/docs/integrations/nitro.mdx +++ b/docs/content/docs/integrations/nitro.mdx @@ -78,7 +78,7 @@ npx prisma db push Follow steps 1 & 2 from the [installation guide](/docs/installation) to install Better Auth in your Nitro application & set up the environment variables. -Once that is done, create your better auth instance within the `server/utils/auth.ts` file. +Once that is done, create your Better Auth instance within the `server/utils/auth.ts` file. ```ts title="server/utils/auth.ts" import { betterAuth } from "better-auth"; diff --git a/examples/nuxt-example/pages/index.vue b/examples/nuxt-example/pages/index.vue index bd94c96272..17bebe78fa 100644 --- a/examples/nuxt-example/pages/index.vue +++ b/examples/nuxt-example/pages/index.vue @@ -43,7 +43,7 @@ const { data: session } = await useSession(useFetch);
- All features on this demo are Implemented with better auth without + All features on this demo are Implemented with Better Auth without any custom backend code
diff --git a/examples/svelte-kit-example/src/routes/+page.svelte b/examples/svelte-kit-example/src/routes/+page.svelte index ccddff3790..990a8c6b3f 100644 --- a/examples/svelte-kit-example/src/routes/+page.svelte +++ b/examples/svelte-kit-example/src/routes/+page.svelte @@ -31,7 +31,7 @@ $: to = $session.data ? "/dashboard" : "/sign-in"; class="text-xs flex items-center gap-2 justify-center text-muted-foreground" > - All features on this demo are Implemented with better auth without + All features on this demo are Implemented with Better Auth without any custom backend code
diff --git a/packages/better-auth/src/types/options.ts b/packages/better-auth/src/types/options.ts index 6fd10897e6..d0fe15aa6d 100644 --- a/packages/better-auth/src/types/options.ts +++ b/packages/better-auth/src/types/options.ts @@ -29,7 +29,7 @@ export type BetterAuthOptions = { */ appName?: string; /** - * Base URL for the better auth. This is typically the + * Base URL for the Better Auth. This is typically the * root URL where your application server is hosted. * If not explicitly set, * the system will check the following environment variable: @@ -40,9 +40,9 @@ export type BetterAuthOptions = { */ baseURL?: string; /** - * Base path for the better auth. This is typically + * Base path for the Better Auth. This is typically * the path where the - * better auth routes are mounted. + * Better Auth routes are mounted. * * @default "/api/auth" */ @@ -51,7 +51,7 @@ export type BetterAuthOptions = { * The secret to use for encryption, * signing and hashing. * - * By default better auth will look for + * By default Better Auth will look for * the following environment variables: * process.env.BETTER_AUTH_SECRET, * process.env.AUTH_SECRET diff --git a/packages/cli/src/commands/init.ts b/packages/cli/src/commands/init.ts index 56ed00785c..6fd019acd0 100644 --- a/packages/cli/src/commands/init.ts +++ b/packages/cli/src/commands/init.ts @@ -28,7 +28,7 @@ import { generateAuthConfig } from "../generators/auth-config"; import { getTsconfigInfo } from "../utils/get-tsconfig-info"; /** - * Should only use any database that is core DBs, and supports the BetterAuth CLI generate functionality. + * Should only use any database that is core DBs, and supports the Better Auth CLI generate functionality. */ const supportedDatabases = [ // Built-in kysely