[GH-ISSUE #6946] Docs: Use same filename in Next.js integration example #28004

Closed
opened 2026-04-17 19:20:02 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @CSalih on GitHub (Dec 23, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/6946

Originally assigned to: @bytaesu on GitHub.

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Goto https://www.better-auth.com/docs/integrations/next
  2. Scroll to Create a client
  3. It says "... are creating client.ts file ..." but the filename of the example is auth-client.ts.

Current vs. Expected behavior

The naming should be consistent, so readers are not getting confused.

What version of Better Auth are you using?

System info

-

Which area(s) are affected? (Select all that apply)

Types, Documentation

Auth config (if applicable)


Additional context

No response

Originally created by @CSalih on GitHub (Dec 23, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/6946 Originally assigned to: @bytaesu on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Goto https://www.better-auth.com/docs/integrations/next 2. Scroll to [Create a client](https://www.better-auth.com/docs/integrations/next#create-a-client) 3. It says "... _are creating_ _`client.ts`_ _file_ ..." but the filename of the example is `auth-client.ts`. ### Current vs. Expected behavior The naming should be consistent, so readers are not getting confused. ### What version of Better Auth are you using? - ### System info ```bash - ``` ### Which area(s) are affected? (Select all that apply) Types, Documentation ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the locked label 2026-04-17 19:20:03 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Dec 23, 2025):

Thank you for bringing this to our attention! It seems there is an inconsistency in the filename referenced in the Next.js integration documentation. While it states to create a client.ts file, the example provided uses auth-client.ts. This could indeed cause confusion for users following the documentation.

You can submit an issue regarding this documentation inconsistency on GitHub, and it will likely be updated to ensure clarity.

If you'd like, I can help you draft a more detailed report for the GitHub issue, or if you have any other questions about Better Auth or its Next.js integration, feel free to ask! What specific functionalities are you looking to implement with Better Auth?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3686010769 --> @better-auth-agent[bot] commented on GitHub (Dec 23, 2025): Thank you for bringing this to our attention! It seems there is an inconsistency in the filename referenced in the Next.js integration documentation. While it states to create a `client.ts` file, the example provided uses `auth-client.ts`. This could indeed cause confusion for users following the documentation. You can submit an issue regarding this documentation inconsistency on GitHub, and it will likely be updated to ensure clarity. If you'd like, I can help you draft a more detailed report for the GitHub issue, or if you have any other questions about Better Auth or its Next.js integration, feel free to ask! What specific functionalities are you looking to implement with Better Auth? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Author
Owner

@dosubot[bot] commented on GitHub (Dec 23, 2025):

Hi @CSalih! I'm Dosu and I’m helping the better-auth team.

You're right—there's a documentation inconsistency in the Next.js integration guide: the instructions mention creating a client.ts file, but the code example is labeled auth-client.ts. This mismatch is confirmed in the current docs and has been discussed by contributors, but hasn't been fixed yet [source] [source].

For clarity, the documentation should use a single, consistent filename throughout—preferably auth-client.ts, since that's the name used in most examples and discussions. This is a documentation-only issue and doesn't affect integration functionality, but fixing it will help avoid confusion for new users.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

<!-- gh-comment-id:3686017541 --> @dosubot[bot] commented on GitHub (Dec 23, 2025): <!-- Greeting --> Hi @CSalih! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> You're right—there's a documentation inconsistency in the Next.js integration guide: the instructions mention creating a `client.ts` file, but the code example is labeled `auth-client.ts`. This mismatch is confirmed in the current docs and has been discussed by contributors, but hasn't been fixed yet [[source]](https://github.com/better-auth/better-auth/issues/6187) [[source]](https://github.com/better-auth/better-auth/blob/d067a83113dbf022df4c16930c171b3434ab9a34/docs/content/docs/integrations/next.mdx#L38-L46). For clarity, the documentation should use a single, consistent filename throughout—preferably `auth-client.ts`, since that's the name used in most examples and discussions. This is a documentation-only issue and doesn't affect integration functionality, but fixing it will help avoid confusion for new users. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/555588c7-b795-4f7b-9a16-e5b6ee15119c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/555588c7-b795-4f7b-9a16-e5b6ee15119c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/555588c7-b795-4f7b-9a16-e5b6ee15119c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/555588c7-b795-4f7b-9a16-e5b6ee15119c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/555588c7-b795-4f7b-9a16-e5b6ee15119c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/555588c7-b795-4f7b-9a16-e5b6ee15119c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/555588c7-b795-4f7b-9a16-e5b6ee15119c?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20right%E2%80%94there%27s%20a%20documentation%20inconsistency%20in%20the%20Next.js%20integration%20guide%3A%20the%20instructions%20mention%20creating%20a%20%60client.ts%60%20file%2C%20but%20the%20code%20example%20is%20labeled%20%60auth-client.ts%60.%20This%20mismatch%20is%20confirmed%20in%20the%20current%20docs%20and%20has%20been%20discussed%20by%20contributors%2C%20but%20hasn%27t%20been%20fixed%20yet%20%5B%5Bsource%5D%5D%28https%3A//github.com/better-auth/better-auth/issues/6187%29%20%5B%5Bsource%5D%5D%28https%3A//github.com/better-auth/better-auth/blob/d067a83113dbf022df4c16930c171b3434ab9a34/docs/content/docs/integrations/next.mdx%23L38-L46%29.%0A%0AFor%20clarity%2C%20the%20documentation%20should%20use%20a%20single%2C%20consistent%20filename%20throughout%E2%80%94preferably%20%60auth-client.ts%60%2C%20since%20that%27s%20the%20name%20used%20in%20most%20examples%20and%20discussions.%20This%20is%20a%20documentation-only%20issue%20and%20doesn%27t%20affect%20integration%20functionality%2C%20but%20fixing%20it%20will%20help%20avoid%20confusion%20for%20new%20users.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/6946)
Author
Owner

@bytaesu commented on GitHub (Dec 23, 2025):

Thanks @CSalih, I'll fix this

<!-- gh-comment-id:3686021097 --> @bytaesu commented on GitHub (Dec 23, 2025): Thanks @CSalih, I'll fix this
Author
Owner

@CSalih commented on GitHub (Dec 23, 2025):

@bytaesu I did already pushed a fix 👍

<!-- gh-comment-id:3686024174 --> @CSalih commented on GitHub (Dec 23, 2025): @bytaesu I did already pushed a fix 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#28004