name: 🚩 Bug report
description: Report a bug or unexpected behavior
type: Bug
body:
  - type: checkboxes
    attributes:
      label: Is this suited for github?
      description: Feel free to join the discord community [here](https://discord.gg/better-auth), we can usually respond faster to any questions.
      options:
        - label: Yes, this is suited for github
  - type: markdown
    attributes:
      value: |
        Thank you for reporting a bug with better-auth!

        - Feature requests should be opened [here](https://github.com/better-auth/better-auth/issues/new?template=feature_request.yml).
        - Before opening a new issue, please [check](https://github.com/better-auth/better-auth/issues) for existing issues and :+1: upvote the existing issue instead. This will result in a quicker resolution.
  - type: textarea
    attributes:
      label: Reproduction
      description: Provide a step-by-step description or a minimal reproduction repository link. This helps us investigate and resolve the issue faster.
      placeholder: |
        Steps to reproduce:
        1. Configure auth with ...
        2. Call `auth.api.signInEmail(...)` with ...
        3. Observe ...

        Or provide a link to a minimal reproduction repository.
    validations:
      required: true
  - type: textarea
    attributes:
      label: Current vs. Expected behavior
      description: |
        A clear and concise description of what the bug is (e.g., screenshots, logs, etc.), and what you expected to happen.

        **Skipping this/failure to provide complete information of the bug will result in the issue being closed.**
      placeholder: 'Following the steps from the previous section, I expected A to happen, but I observed B instead.'
    validations:
      required: true
  - type: input
    attributes:
      label: What version of Better Auth are you using?
      description: Please provide the current version of `better-auth` that you are reporting the bug on
      placeholder: "1.x.x"
    validations:
      required: true
  - type: textarea
    attributes:
      label: System info
      description: Output of `npx auth info --json`
      render: bash
      placeholder: System and Better Auth info
    validations:
      required: true
  - type: dropdown
    attributes:
      label: Which area(s) are affected? (Select all that apply)
      multiple: true
      options:
        - 'Backend'
        - 'Client'
        - 'Types'
        - 'Documentation'
        - 'Package'
        - 'Other'
    validations:
      required: true
  - type: textarea
    attributes:
      label: Auth config (if applicable)
      description: If you haven't already shared a reproducible example or don't think it's unrelated, please include your auth config. Make sure to remove any sensitive information.
      render: typescript
      value: |
        import { betterAuth } from "better-auth"
        export const auth = betterAuth({
          emailAndPassword: {  
            enabled: true
          },
        });
  - type: textarea
    attributes:
      label: Additional context
      description: |
        Any extra information that might help us investigate. For example, is it only reproducible online, or locally too? Is the issue only happening in a specific browser? etc.
      placeholder: |
        I tested my reproduction against the latest release.
