[GH-ISSUE #1373] Better Auth Server #8717

Closed
opened 2026-04-13 03:52:50 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @R5dan on GitHub (Feb 6, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1373

Is this suited for github?

  • Yes, this is suited for github

If you want to use better auth on a package not supported or another language, then there is no way to add some useful features or stick with better auth.

Describe the solution you'd like

I would like to have a Better Auth Server that can be deployed anywhere and is purely the backend api of better auth. These can then easily be called by other projects allowing for a connected auth system and the ability to use better auth in other languages or systems.

Describe alternatives you've considered

You could also make a blank project with just better auth added

Additional context

No response

Originally created by @R5dan on GitHub (Feb 6, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1373 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. If you want to use better auth on a package not supported or another language, then there is no way to add some useful features or stick with better auth. ### Describe the solution you'd like I would like to have a `Better Auth Server` that can be deployed anywhere and is purely the backend api of better auth. These can then easily be called by other projects allowing for a connected auth system and the ability to use better auth in other languages or systems. ### Describe alternatives you've considered You could also make a blank project with just better auth added ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 03:52:50 -05:00
Author
Owner

@KoesterJannik commented on GitHub (Feb 7, 2025):

Can't you just do that? Better auth exposes rest apis that you can use in any language

<!-- gh-comment-id:2644197113 --> @KoesterJannik commented on GitHub (Feb 7, 2025): Can't you just do that? Better auth exposes rest apis that you can use in any language
Author
Owner

@R5dan commented on GitHub (Feb 8, 2025):

Im not saying that it can't be done. Im almost looking for a create better-auth which gives a preconfigured app that can just be deployed.

<!-- gh-comment-id:2645933354 --> @R5dan commented on GitHub (Feb 8, 2025): Im not saying that it can't be done. Im almost looking for a `create better-auth` which gives a preconfigured app that can just be deployed.
Author
Owner

@ping-maxwell commented on GitHub (Feb 10, 2025):

I'm in the works of developing an init command for the Better Auth CLI.
However it's definitely out of scope for Better Auth to generate entire frameworks/projects, we leave that to each framework's individual CLIs to handle for you.

So our init command would only:

  • Install better-auth to your project
  • Initialize Better auth config files for you
  • Ask for plugins you want
  • Ask for the database you want

In your case, with a simple backend server, we recommend you look into the Hono or Node.js integration, and once that's setup, you can run the npx @better-auth/cli init command. (once the command is ready)

<!-- gh-comment-id:2646855458 --> @ping-maxwell commented on GitHub (Feb 10, 2025): I'm in the works of developing an `init` command for the Better Auth CLI. However it's definitely out of scope for Better Auth to generate entire frameworks/projects, we leave that to each framework's individual CLIs to handle for you. So our `init` command would only: * Install better-auth to your project * Initialize Better auth config files for you * Ask for plugins you want * Ask for the database you want In your case, with a simple backend server, we recommend you look into the Hono or Node.js integration, and once that's setup, you can run the `npx @better-auth/cli init` command. (once the command is ready)
Author
Owner

@R5dan commented on GitHub (Feb 10, 2025):

However it's definitely out of scope for Better Auth to generate entire frameworks/projects, we leave that to each framework's individual CLIs to handle for you.

I would agree. I am looking to simply have a Better auth project, just for its API. The "project" would have nothing else.

In your case, with a simple backend server, we recommend you look into the Hono or Node.js integration, and once that's setup, you can run the npx @better-auth/cli init command. (once the command is ready)

This would work, but I wouldn't care about what backends in use, as long as CORS is fine.

From what I can tell, I basically want the init command to just be deployable other than putting in my env variables. It only needs to contain the better-auth APIs

<!-- gh-comment-id:2647624660 --> @R5dan commented on GitHub (Feb 10, 2025): > However it's definitely out of scope for Better Auth to generate entire frameworks/projects, we leave that to each framework's individual CLIs to handle for you. I would agree. I am looking to simply have a Better auth project, just for its API. The "project" would have nothing else. > In your case, with a simple backend server, we recommend you look into the Hono or Node.js integration, and once that's setup, you can run the `npx @better-auth/cli init` command. (once the command is ready) This would work, but I wouldn't care about what backends in use, as long as CORS is fine. From what I can tell, I basically want the `init` command to just be deployable other than putting in my env variables. It only needs to contain the better-auth APIs
Author
Owner

@ping-maxwell commented on GitHub (Feb 10, 2025):

You will still need to do preparation work.
The CLI will not generate all of the code to make Better Auth work.
The CLI will only handle dependencies, the auth config (including plugins & DB setup) and that's it.
Everything else needs to be linked up yourself.

<!-- gh-comment-id:2648682190 --> @ping-maxwell commented on GitHub (Feb 10, 2025): You will still need to do preparation work. The CLI will not generate all of the code to make Better Auth work. The CLI will only handle dependencies, the auth config (including plugins & DB setup) and that's it. Everything else needs to be linked up yourself.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8717