Repository: better-auth/better-auth
Pull request #2654: fix: typos
Author: login: MuntasirSZN
Labels: name: locked
description: Locked conversations after being closed for 7 days
Created: 2025-05-14T08:44:45Z | Merged: 2025-05-14T17:27:58Z

Thanks to `typos` cli.


Diff:
diff --git a/docs/app/api/og/route.tsx b/docs/app/api/og/route.tsx
index 5ad1dc65852..0c9b70ba905 100644
--- a/docs/app/api/og/route.tsx
+++ b/docs/app/api/og/route.tsx
@@ -121,7 +121,7 @@ export async function GET(req: Request) {
 							style={{ fontFamily: "GeistMono", fontWeight: "normal" }}
 							tw="relative flex mt-10 text-xl uppercase font-bold gap-2 items-center"
 						>
-							{type === "documentaiton" ? (
+							{type === "documentation" ? (
 								<svg
 									xmlns="http://www.w3.org/2000/svg"
 									width="1.2em"
diff --git a/docs/components/github-stat.tsx b/docs/components/github-stat.tsx
index 259890e666b..79e11008aed 100644
--- a/docs/components/github-stat.tsx
+++ b/docs/components/github-stat.tsx
@@ -11,7 +11,7 @@ export function GithubStat({ stars }: { stars: string | null }) {
 	return (
 		<a
 			href="https://github.com/better-auth/better-auth"
-			className="flex mt-4 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground rounded-none h-10 p-5 ml-auto z-50 overflow-hidden items-center text-sm font-medium focus-visible:outline-none  disabled:pointer-events-none disabled:opacity-50 bg-transprent dark:text-white text-black px-4 py-2 max-w-[14.8rem] whitespace-pre md:flex group relative w-full justify-center gap-2 transition-all duration-300 ease-out  hover:ring-black"
+			className="flex mt-4 border border-input shadow-sm hover:bg-accent hover:text-accent-foreground rounded-none h-10 p-5 ml-auto z-50 overflow-hidden items-center text-sm font-medium focus-visible:outline-none  disabled:pointer-events-none disabled:opacity-50 bg-transparent dark:text-white text-black px-4 py-2 max-w-[14.8rem] whitespace-pre md:flex group relative w-full justify-center gap-2 transition-all duration-300 ease-out  hover:ring-black"
 		>
 			<span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 dark:bg-white/60 bg-black/60 opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-40"></span>
 			<div className="flex items-center ml-2">
diff --git a/docs/content/docs/concepts/database.mdx b/docs/content/docs/concepts/database.mdx
index 5c4ea59170d..31d91cc2bad 100644
--- a/docs/content/docs/concepts/database.mdx
+++ b/docs/content/docs/concepts/database.mdx
@@ -505,7 +505,7 @@ There are two types of hooks you can define:
 #### 1. Before Hook
 
 - **Purpose**: This hook is called before the respective entity (user, session, or account) is created or updated.
-- **Behavior**: If the hook returns `false`, the operation will be aborted. And If it returns a data object, it'll replace the orginal payload.
+- **Behavior**: If the hook returns `false`, the operation will be aborted. And If it returns a data object, it'll replace the original payload.
 
 #### 2. After Hook
 
diff --git a/docs/content/docs/plugins/api-key.mdx b/docs/content/docs/plugins/api-key.mdx
index 4442c09fb3a..3baa8246073 100644
--- a/docs/content/docs/plugins/api-key.mdx
+++ b/docs/content/docs/plugins/api-key.mdx
@@ -588,7 +588,7 @@ Customize the starting characters configuration.
   <Accordion title="startingCharactersConfig Options">
     `shouldStore` <span className="opacity-70">`boolean`</span>
 
-    Wether to store the starting characters in the database.
+    Whether to store the starting characters in the database.
     If false, we will set `start` to `null`.
     Default is `true`.
 
@@ -645,7 +645,7 @@ Customize the key expiration.
 
     `disableCustomExpiresTime` <span className="opacity-70">`boolean`</span>
 
-    Wether to disable the expires time passed from the client.
+    Whether to disable the expires time passed from the client.
     If `true`, the expires time will be based on the default values.
     Default is `false`.
 
diff --git a/examples/nuxt-example/components/ui/chart-area/AreaChart.vue b/examples/nuxt-example/components/ui/chart-area/AreaChart.vue
index bc12e6dd32a..22161ec7beb 100644
--- a/examples/nuxt-example/components/ui/chart-area/AreaChart.vue
+++ b/examples/nuxt-example/components/ui/chart-area/AreaChart.vue
@@ -21,7 +21,7 @@ const props = withDefaults(
 			 * Controls the visibility of gradient.
 			 * @default true
 			 */
-			showGradiant?: boolean;
+			showGradient?: boolean;
 		}
 	>(),
 	{
@@ -33,7 +33,7 @@ const props = withDefaults(
 		showTooltip: true,
 		showLegend: true,
 		showGridLine: true,
-		showGradiant: true,
+		showGradient: true,
 	},
 );
 
@@ -74,7 +74,7 @@ function handleLegendItemClick(d: BulletLegendItemInterface, i: number) {
       <svg width="0" height="0">
         <defs>
           <linearGradient v-for="(color, i) in colors" :id="`${chartRef}-color-${i}`" :key="i" x1="0" y1="0" x2="0" y2="1">
-            <template v-if="showGradiant">
+            <template v-if="showGradient">
               <stop offset="5%" :stop-color="color" stop-opacity="0.4" />
               <stop offset="95%" :stop-color="color" stop-opacity="0" />
             </template>
diff --git a/packages/better-auth/src/adapters/create-adapter/test/create-adapter.test.ts b/packages/better-auth/src/adapters/create-adapter/test/create-adapter.test.ts
index 0b3fb87b2c6..fa2857ddec9 100644
--- a/packages/better-auth/src/adapters/create-adapter/test/create-adapter.test.ts
+++ b/packages/better-auth/src/adapters/create-adapter/test/create-adapter.test.ts
@@ -243,7 +243,7 @@ describe("Create Adapter Helper", async () => {
 				expect(res3).not.toHaveProperty("id");
 			});
 
-			test('Should recieve a generated id during the call, unless "disableIdGeneration" is set to true', async () => {
+			test('Should receive a generated id during the call, unless "disableIdGeneration" is set to true', async () => {
 				const createWithId: { id: unknown } = await new Promise(async (r) => {
 					const adapter = await createTestAdapter({
 						adapter(args_0) {
@@ -1380,7 +1380,7 @@ describe("Create Adapter Helper", async () => {
 				expect(parameters.where?.[0].field).toEqual("email_address");
 			});
 
-			test("findOne: Should recieve an integer id in where clause if the user has enabled `useNumberId`", async () => {
+			test("findOne: Should receive an integer id in where clause if the user has enabled `useNumberId`", async () => {
 				const parameters: { where: Where[]; model: string; select?: string[] } =
 					await new Promise(async (r) => {
 						const adapter = await createTestAdapter({
@@ -1417,10 +1417,10 @@ describe("Create Adapter Helper", async () => {
 						//@ts-ignore
 						expect(res?.id).toEqual("1");
 					});
-				// The where clause should conver the string id value of `"1"` to an int since `useNumberId` is true
+				// The where clause should convert the string id value of `"1"` to an int since `useNumberId` is true
 				expect(parameters.where[0].value).toEqual(1);
 			});
-			test("findMany: Should recieve an integer id in where clause if the user has enabled `useNumberId`", async () => {
+			test("findMany: Should receive an integer id in where clause if the user has enabled `useNumberId`", async () => {
 				const parameters: { where: Where[] | undefined; model: string } =
 					await new Promise(async (r) => {
 						const adapter = await createTestAdapter({
@@ -1459,7 +1459,7 @@ describe("Create Adapter Helper", async () => {
 						//@ts-ignore
 						expect(res[0].id).toEqual("1");
 					});
-				// The where clause should conver the string id value of `"1"` to an int since `useNumberId` is true
+				// The where clause should convert the string id value of `"1"` to an int since `useNumberId` is true
 				expect(parameters.where?.[0].value).toEqual(1);
 			});
 		});
diff --git a/packages/better-auth/src/init.test.ts b/packages/better-auth/src/init.test.ts
index 7062d06a131..2e584267359 100644
--- a/packages/better-auth/src/init.test.ts
+++ b/packages/better-auth/src/init.test.ts
@@ -122,7 +122,7 @@ describe("init", async () => {
 		expect(ctx.options.emailAndPassword?.enabled).toBe(true);
 	});
 
-	it("should not allow plugins to set config values if theyre set in the main config", async () => {
+	it("should not allow plugins to set config values if they are set in the main config", async () => {
 		const ctx = await init({
 			database,
 			baseURL: "http://localhost:3000",
diff --git a/packages/better-auth/src/plugins/api-key/types.ts b/packages/better-auth/src/plugins/api-key/types.ts
index 9b9b37a37c7..6d8dccfaeab 100644
--- a/packages/better-auth/src/plugins/api-key/types.ts
+++ b/packages/better-auth/src/plugins/api-key/types.ts
@@ -47,7 +47,7 @@ export interface ApiKeyOptions {
 	 */
 	startingCharactersConfig?: {
 		/**
-		 * Wether to store the starting characters in the database. If false, we will set `start` to `null`.
+		 * Whether to store the starting characters in the database. If false, we will set `start` to `null`.
 		 *
 		 * @default true
 		 */
@@ -115,7 +115,7 @@ export interface ApiKeyOptions {
 		 */
 		defaultExpiresIn?: number | null;
 		/**
-		 * Wether to disable the expires time passed from the client.
+		 * Whether to disable the expires time passed from the client.
 		 *
 		 * If `true`, the expires time will be based on the default values.
 		 *
diff --git a/packages/better-auth/src/plugins/captcha/captcha.test.ts b/packages/better-auth/src/plugins/captcha/captcha.test.ts
index dc840668d69..228027c0269 100644
--- a/packages/better-auth/src/plugins/captcha/captcha.test.ts
+++ b/packages/better-auth/src/plugins/captcha/captcha.test.ts
@@ -123,7 +123,7 @@ describe("captcha", async (it) => {
 		});
 		const headers = new Headers();
 
-		it("Should successful sign in users if they passed the CAPTCHA challenge", async () => {
+		it("Should successfully sign in users if they passed the CAPTCHA challenge", async () => {
 			mockBetterFetch.mockResolvedValue({
 				data: {
 					success: true,
@@ -196,7 +196,7 @@ describe("captcha", async (it) => {
 		});
 		const headers = new Headers();
 
-		it("Should successfuly sign in users if they passed the CAPTCHA challenge", async () => {
+		it("Should successfully sign in users if they passed the CAPTCHA challenge", async () => {
 			mockBetterFetch.mockResolvedValue({
 				data: {
 					success: true,
@@ -291,7 +291,7 @@ describe("captcha", async (it) => {
 		});
 		const headers = new Headers();
 
-		it("Should successfuly sign in users if they passed the CAPTCHA challenge", async () => {
+		it("Should successfully sign in users if they passed the CAPTCHA challenge", async () => {
 			mockBetterFetch.mockResolvedValue({
 				data: {
 					success: true,
diff --git a/packages/better-auth/src/plugins/oidc-provider/authorize.ts b/packages/better-auth/src/plugins/oidc-provider/authorize.ts
index 5b29ea25de1..56e4a92dd27 100644
--- a/packages/better-auth/src/plugins/oidc-provider/authorize.ts
+++ b/packages/better-auth/src/plugins/oidc-provider/authorize.ts
@@ -184,7 +184,7 @@ export async function authorize(
 					 * This means the code now needs to be treated as a
 					 * consent request.
 					 *
-					 * once the user consents, teh code will be updated
+					 * once the user consents, the code will be updated
 					 * with the actual code. This is to prevent the
 					 * client from using the code before the user
 					 * consents.
diff --git a/packages/better-auth/src/social-providers/roblox.ts b/packages/better-auth/src/social-providers/roblox.ts
index 2ffca701b6b..4002ff4f2b9 100644
--- a/packages/better-auth/src/social-providers/roblox.ts
+++ b/packages/better-auth/src/social-providers/roblox.ts
@@ -7,9 +7,9 @@ export interface RobloxProfile extends Record<string, any> {
 	sub: string;
 	/** the user's username */
 	preferred_username: string;
-	/** the user's display name, will return the same value as the preffered_username if not set */
+	/** the user's display name, will return the same value as the preferred_username if not set */
 	nickname: string;
-	/** the user's display name, again, will return the same value as the preffered_username if not set */
+	/** the user's display name, again, will return the same value as the preferred_username if not set */
 	name: string;
 	/** the account creation date as a unix timestamp in seconds */
 	created_at: number;
diff --git a/packages/cli/src/generators/auth-config.ts b/packages/cli/src/generators/auth-config.ts
index f44c788d5b4..0ad90fa699e 100644
--- a/packages/cli/src/generators/auth-config.ts
+++ b/packages/cli/src/generators/auth-config.ts
@@ -61,19 +61,19 @@ export async function generateAuthConfig({
 			},
 		} satisfies CommonIndexConfig<{}>,
 	};
-	const common_indexs = {
+	const common_indexes = {
 		START_OF_PLUGINS:
 			_start_of_plugins_common_index.START_OF_PLUGINS satisfies CommonIndexConfig<{}>,
 		END_OF_PLUGINS: {
 			type: "manual",
 			getIndex: ({ content, additionalFields }) => {
-				const clsoingBracketIndex = findClosingBracket(
+				const closingBracketIndex = findClosingBracket(
 					content,
 					additionalFields.start_of_plugins,
 					"[",
 					"]",
 				);
-				return clsoingBracketIndex;
+				return closingBracketIndex;
 			},
 		} satisfies CommonIndexConfig<{ start_of_plugins: number }>,
 		START_OF_BETTERAUTH: {
@@ -94,7 +94,7 @@ export async function generateAuthConfig({
 		}): Promise<{ code: string; dependencies: string[]; envs: string[] }> => {
 			let start_of_plugins = getGroupInfo(
 				opts.config,
-				common_indexs.START_OF_PLUGINS,
+				common_indexes.START_OF_PLUGINS,
 				{},
 			);
 
@@ -107,7 +107,7 @@ export async function generateAuthConfig({
 			}
 			let end_of_plugins = getGroupInfo(
 				opts.config,
-				common_indexs.END_OF_PLUGINS,
+				common_indexes.END_OF_PLUGINS,
 				{ start_of_plugins: start_of_plugins.index },
 			);
 
@@ -228,7 +228,7 @@ export async function generateAuthConfig({
 				if (code_before_betterAuth) {
 					let start_of_betterauth = getGroupInfo(
 						opts.config,
-						common_indexs.START_OF_BETTERAUTH,
+						common_indexes.START_OF_BETTERAUTH,
 						{},
 					);
 					if (!start_of_betterauth) {
@@ -454,7 +454,7 @@ export async function generateAuthConfig({
 
 			let start_of_betterauth = getGroupInfo(
 				opts.config,
-				common_indexs.START_OF_BETTERAUTH,
+				common_indexes.START_OF_BETTERAUTH,
 				{},
 			);
 			if (!start_of_betterauth) {


Reviews:
user: login: cubic-dev-ai[bot]
body: mrge found 2 issues across 12 files. Review them in [mrge.io](https://mrge.io/pr/better-auth/better-auth/pull/2654)
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T09:13:10Z

Review comments:
diff_hunk: @@ -11,7 +11,7 @@ export function GithubStat({ stars }: { stars: string | null }) {
 	return (
 		<a
 			href="https://github.com/better-auth/better-auth"
-			className="flex mt-4 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground rounded-none h-10 p-5 ml-auto z-50 overflow-hidden items-center text-sm font-medium focus-visible:outline-none  disabled:pointer-events-none disabled:opacity-50 bg-transprent dark:text-white text-black px-4 py-2 max-w-[14.8rem] whitespace-pre md:flex group relative w-full justify-center gap-2 transition-all duration-300 ease-out  hover:ring-black"
+			className="flex mt-4 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground rounded-none h-10 p-5 ml-auto z-50 overflow-hidden items-center text-sm font-medium focus-visible:outline-none  disabled:pointer-events-none disabled:opacity-50 bg-transparent dark:text-white text-black px-4 py-2 max-w-[14.8rem] whitespace-pre md:flex group relative w-full justify-center gap-2 transition-all duration-300 ease-out  hover:ring-black"
path: docs/components/github-stat.tsx
user: login: cubic-dev-ai[bot]
body: <!-- metadata:{"confidence":9,"steps":[{"text":"I'll review the changed lines in the PR for any issues. Let me analyze the diff carefully.","toolCalls":[{"args":{"pattern":"docs/components/github-stat.tsx"},"toolName":"listFiles"}]},{"text":"Looking at the diff, I can see that the PR is fixing a typo in the className attribute of an anchor tag. The change is from `bg-transprent` to `bg-transparent`. Let me check if this is a valid Tailwind CSS class and if there are any other issues with this change.","toolCalls":[{"args":{"command":"grep -r \"bg-transprent\" docs --include=\"*.tsx\" --include=\"*.jsx\" --include=\"*.css\""},"toolName":"executeCommand"}]},{"text":"","toolCalls":[{"args":{"command":"grep -r \"bg-transparent\" docs --include=\"*.tsx\" --include=\"*.jsx\" --include=\"*.css\""},"toolName":"executeCommand"}]}]} -->
The className contains duplicate background style properties: 'bg-background' and 'bg-transparent' which conflict with each other.
created_at: 2025-05-14T09:13:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -196,7 +196,7 @@ describe("captcha", async (it) => {
 		});
 		const headers = new Headers();
 
-		it("Should successfuly sign in users if they passed the CAPTCHA challenge", async () => {
+		it("Should successfully sign in users if they passed the CAPTCHA challenge", async () => {
path: packages/better-auth/src/plugins/captcha/captcha.test.ts
user: login: cubic-dev-ai[bot]
body: <!-- metadata:{"confidence":10,"steps":[{"text":"I'll review the changed lines in the PR for any issues. Let me first understand what changes were made.","toolCalls":[{"args":{"command":"grep -n \"Should successfuly\" packages/better-auth/src/plugins/captcha/captcha.test.ts"},"toolName":"executeCommand"}]},{"text":"Let me check the file content to understand the context better:","toolCalls":[{"args":{"command":"grep -n \"Should successfully\" packages/better-auth/src/plugins/captcha/captcha.test.ts"},"toolName":"executeCommand"}]},{"text":"Let me also check if there are any other typos in the file that might need fixing:","toolCalls":[{"args":{"command":"grep -n \"successfuly\" packages/better-auth/src/plugins/captcha/captcha.test.ts"},"toolName":"executeCommand"}]},{"text":"Let me check for any other potential typos in the file:","toolCalls":[{"args":{"command":"grep -n \"Should successful\" packages/better-auth/src/plugins/captcha/captcha.test.ts"},"toolName":"executeCommand"}]},{"text":"I see there's still one more typo in the file at line 126 where \"successful\" is used instead of \"successfully\". Let me check the full context of that line:","toolCalls":[{"args":{"command":"grep -A 5 -B 5 \"Should successful sign in\" packages/better-auth/src/plugins/captcha/captcha.test.ts"},"toolName":"executeCommand"}]}]} -->
This PR fixes the typo 'successfuly' to 'successfully' in two places, but there's still another typo at line 126 where 'successful' is used instead of 'successfully'.
created_at: 2025-05-14T09:13:10Z
author_association: CONTRIBUTOR

PR comments:
user: login: vercel[bot]
created_at: 2025-05-14T08:44:52Z
body: @MuntasirSZN is attempting to deploy a commit to the **better-auth** Team on [Vercel](https://vercel.com).

A member of the Team first needs to [authorize it](https://vercel.com/git/authorize?team=better-auth&type=github&job=%7B%22headInfo%22%3A%7B%22sha%22%3A%2259b532f02c42f55459794c06f5f3220e609b95d5%22%7D%2C%22id%22%3A%22QmSwHm9k71BhK6hYeLW3N3dnxZbEerQPe5nqqVs1R7rgUa%22%2C%22org%22%3A%22better-auth%22%2C%22prId%22%3A2654%2C%22repo%22%3A%22better-auth%22%7D).


author_association: NONE
user: login: pkg-pr-new[bot]
created_at: 2025-05-14T08:46:32Z
body: 
[Open in StackBlitz](https://pkg.pr.new/template/cac7e575-a566-4bf8-b5fa-407ef8d8daaa)


```
npm i https://pkg.pr.new/better-auth/better-auth@2654
```


```
npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/cli@2654
```


```
npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/expo@2654
```


```
npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/stripe@2654
```


_commit: <a href="https://github.com/better-auth/better-auth/runs/42198116716"><code>62bfc3f</code></a>_

author_association: NONE