Skip to content

feat: Add Better auth for Auth optionsΒ #2116

@Jpisnice

Description

@Jpisnice

Is your feature request related to a problem? Please describe.

Better Auth is framework-agnostic authentication (and authorization) library for TypeScript. It provides a comprehensive set of features out of the box.

Describe the solution you'd like to see

Proposed Implementation

Enhanced CLI Command:

    Command: my-cli-tool init --auth-provider

    Behavior: When the --auth-provider flag is used, the CLI should:

        Accept values such as nextauth or better-auth.

        Based on the selected provider, execute the corresponding setup procedures.

Interactive Prompt:

    If the --auth-provider flag is omitted, prompt the user to select their preferred authentication provider:
    [GitHub+5Better Auth+5Stack Overflow+5](https://www.better-auth.com/docs/installation?utm_source=chatgpt.com)

Which authentication provider would you like to use?
❯ NextAuth.js
  Better Auth

Proceed with the setup based on the user's selection.

Provider-Specific Setup:

NextAuth.js:

    Install necessary dependencies.

    Generate configuration files and routes.

    Provide guidance on setting up providers and callbacks.

Better Auth:

    Execute the init command from Better Auth's CLI to scaffold necessary files and configurations:

npx @better-auth/cli@latest init --framework nextjs --database sqlite

Handle schema generation and migrations as needed.

Set up environment variables and provide guidance on plugin integrations.

Describe alternate solutions

none

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions