Document form-based auth to support progressive enhancement #2358

Open
opened 2026-03-13 09:46:48 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @benmccann on GitHub (Nov 22, 2025).

Is this suited for github?

  • Yes, this is suited for github

Users should be able to submit a login form without JavaScript being required

A user might not have JavaScript loaded on the page. This is more common than users just disabling it. E.g. perhaps they were riding the subway and lost their network connection when they went into a tunnel leaving them in a state where they've received the HTML, but not JS

While this is possible today the documentation does not communicate how to do it

Describe the solution you'd like

Show how to do authentication with a form in the docs. The docs really focus on the client-side part today and have very little mention of the server-side part. In particular, it was very hard to figure out how to handle redirects as it was not mentioned how to do this and a non-standard way of handling it is used (https://github.com/better-auth/better-auth/issues/6219)

Describe alternatives you've considered

Forget about the user experience

Additional context

Some web frameworks are built with progressive enhancement in mind and this makes better-auth a less compelling solution for those sites that otherwise fully work without JavaScript. E.g. https://svelte.dev/docs/kit/form-actions#Progressive-enhancement

Originally created by @benmccann on GitHub (Nov 22, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Users should be able to submit a login form without JavaScript being required A user might not have JavaScript loaded on the page. This is more common than users just disabling it. E.g. perhaps they were riding the subway and lost their network connection when they went into a tunnel leaving them in a state where they've received the HTML, but not JS While this is possible today the documentation does not communicate how to do it ### Describe the solution you'd like Show how to do authentication with a form in the docs. The docs really focus on the client-side part today and have very little mention of the server-side part. In particular, it was very hard to figure out how to handle redirects as it was not mentioned how to do this and a non-standard way of handling it is used (https://github.com/better-auth/better-auth/issues/6219) ### Describe alternatives you've considered Forget about the user experience ### Additional context Some web frameworks are built with progressive enhancement in mind and this makes better-auth a less compelling solution for those sites that otherwise fully work without JavaScript. E.g. https://svelte.dev/docs/kit/form-actions#Progressive-enhancement
GiteaMirror added the enhancement label 2026-03-13 09:46:48 -05:00
Author
Owner

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

Thanks for submitting your feature request! We understand that supporting form-based authentication allows sites that prioritize progressive enhancement to operate fully without JavaScript. Your suggestion to include an example code snippet and guidance in our documentation is insightful and aligns well with our goal of making Better Auth as accessible as possible.

At this point, our team is discussing the best strategies to add server-side endpoints that can handle traditional form submissions securely while maintaining all the authentication benefits. Do you have a specific framework or use case in mind that we could consider in our documentation update? Tag @better-auth-agent if you would like an answer from the Agent.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Nov 22, 2025): Thanks for submitting your feature request! We understand that supporting form-based authentication allows sites that prioritize progressive enhancement to operate fully without JavaScript. Your suggestion to include an example code snippet and guidance in our documentation is insightful and aligns well with our goal of making Better Auth as accessible as possible. At this point, our team is discussing the best strategies to add server-side endpoints that can handle traditional form submissions securely while maintaining all the authentication benefits. Do you have a specific framework or use case in mind that we could consider in our documentation update? Tag @better-auth-agent if you would like an answer from the Agent. <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 21, 2026):

Hi, @benmccann. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested documentation for implementing form-based authentication without JavaScript to support progressive enhancement.
  • Current documentation mainly covers client-side usage and lacks server-side guidance.
  • The better-auth team acknowledged the importance of this feature and is discussing adding secure server-side endpoints for traditional form submissions.
  • The team asked you for specific frameworks or use cases to better tailor the documentation update.
  • The issue remains unresolved and under consideration.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of better-auth by commenting here with any updates or additional input.
  • If I don’t hear back within 7 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 21, 2026): Hi, @benmccann. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested documentation for implementing form-based authentication without JavaScript to support progressive enhancement. - Current documentation mainly covers client-side usage and lacks server-side guidance. - The better-auth team acknowledged the importance of this feature and is discussing adding secure server-side endpoints for traditional form submissions. - The team asked you for specific frameworks or use cases to better tailor the documentation update. - The issue remains unresolved and under consideration. **Next Steps:** - Please let us know if this issue is still relevant to the latest version of better-auth by commenting here with any updates or additional input. - If I don’t hear back within 7 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@lishaduck commented on GitHub (Feb 21, 2026):

Not stale, there does not appear to be any new documentation.

@lishaduck commented on GitHub (Feb 21, 2026): Not stale, there does not appear to be any new documentation.
Author
Owner

@Bekacru commented on GitHub (Feb 22, 2026):

Will be documeted but its already possible

@Bekacru commented on GitHub (Feb 22, 2026): Will be documeted but its already possible
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2358