[GH-ISSUE #5024] requestSignUp not working when disableImplicitSignUp=true #10142

Closed
opened 2026-04-13 06:04:51 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ubinatus on GitHub (Oct 1, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/5024

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

When attempting to sign in using OAuth with the configuration setting disableImplicitSignUp set to true, the system fails to create a new user as expected through the requestSignUp configuration.

Steps to Reproduce:

  1. Set disableImplicitSignUp to true in the configuration.
  2. Attempt to sign in using OAuth.
  3. Observe that the user is not created via the requestSignUp config.

Current vs. Expected behavior

Expected Behavior:
The system should create a new user through the requestSignUp configuration when signing in with OAuth, even with disableImplicitSignUp set to true.

Actual Behavior:
No new user is created, and the sign-in process does not trigger the requestSignUp configuration.

What version of Better Auth are you using?

1.3.24

System info

{
  "system": {
    "platform": "darwin",
    "arch": "arm64",
    "version": "Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041",
    "release": "24.6.0",
    "cpuCount": 16,
    "cpuModel": "Apple M4 Max",
    "totalMemory": "128.00 GB",
    "freeMemory": "9.95 GB"
  },
  "node": {
    "version": "v22.19.0",
    "env": "development"
  },
  "packageManager": {
    "name": "npm",
    "version": "10.9.3"
  },
  "frameworks": [
    {
      "name": "next",
      "version": "^15.5.4"
    },
    {
      "name": "react",
      "version": "^19.1.1"
    }
  ],
  "databases": null,
  "betterAuth": {
    "version": "1.3.24",
    "config": null
  }
}

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

Backend, Client

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
  socialProviders: {
    google: {
      // prompt: 'select_account', // <- Always prompt the user to select an account
      accessType: 'offline',
      prompt: 'select_account consent',
      disableImplicitSignUp: true, // <- Prevents log-in to create an account
      clientId: env.GOOGLE_CLIENT_ID,
      clientSecret: env.GOOGLE_CLIENT_SECRET,
      redirectURI: env.GOOGLE_AUTH_REDIRECT_URL,
    },
  }
});

Additional context

In client, this is failing to create a user, making the request have a signup_disable

      await signIn.social({
        provider: 'google',
        requestSignUp: true,
      });
Originally created by @ubinatus on GitHub (Oct 1, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/5024 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce When attempting to sign in using OAuth with the configuration setting disableImplicitSignUp set to true, the system fails to create a new user as expected through the requestSignUp configuration. Steps to Reproduce: 1. Set disableImplicitSignUp to true in the configuration. 2. Attempt to sign in using OAuth. 3. Observe that the user is not created via the requestSignUp config. ### Current vs. Expected behavior **Expected Behavior:** The system should create a new user through the requestSignUp configuration when signing in with OAuth, even with disableImplicitSignUp set to true. **Actual Behavior:** No new user is created, and the sign-in process does not trigger the requestSignUp configuration. ### What version of Better Auth are you using? 1.3.24 ### System info ```bash { "system": { "platform": "darwin", "arch": "arm64", "version": "Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041", "release": "24.6.0", "cpuCount": 16, "cpuModel": "Apple M4 Max", "totalMemory": "128.00 GB", "freeMemory": "9.95 GB" }, "node": { "version": "v22.19.0", "env": "development" }, "packageManager": { "name": "npm", "version": "10.9.3" }, "frameworks": [ { "name": "next", "version": "^15.5.4" }, { "name": "react", "version": "^19.1.1" } ], "databases": null, "betterAuth": { "version": "1.3.24", "config": null } } ``` ### Which area(s) are affected? (Select all that apply) Backend, Client ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, socialProviders: { google: { // prompt: 'select_account', // <- Always prompt the user to select an account accessType: 'offline', prompt: 'select_account consent', disableImplicitSignUp: true, // <- Prevents log-in to create an account clientId: env.GOOGLE_CLIENT_ID, clientSecret: env.GOOGLE_CLIENT_SECRET, redirectURI: env.GOOGLE_AUTH_REDIRECT_URL, }, } }); ``` ### Additional context In client, this is failing to create a user, making the request have a `signup_disable` ```typescript await signIn.social({ provider: 'google', requestSignUp: true, }); ```
GiteaMirror added the lockedbug labels 2026-04-13 06:04:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 1, 2025):

This behavior is due to the current logic in Better Auth: when disableImplicitSignUp is true, the backend blocks user creation for new OAuth sign-ins before it checks the requestSignUp flag, resulting in a signup_disable error even if you explicitly request sign-up. This means requestSignUp does not currently override disableImplicitSignUp, which is likely an implementation oversight and not the intended behavior. The code and recent PRs confirm that disableImplicitSignUp is recognized and passed to the provider logic, but the order of checks prevents requestSignUp from working as expected in this scenario (PR #4395).

There isn't an official workaround documented. If you need to allow explicit sign-up via OAuth while blocking implicit sign-up, you may need to temporarily toggle disableImplicitSignUp or handle user creation after authentication as a workaround until the logic is updated.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

<!-- gh-comment-id:3357590130 --> @dosubot[bot] commented on GitHub (Oct 1, 2025): <!-- Answer --> This behavior is due to the current logic in Better Auth: when disableImplicitSignUp is true, the backend blocks user creation for new OAuth sign-ins before it checks the requestSignUp flag, resulting in a signup_disable error even if you explicitly request sign-up. This means requestSignUp does not currently override disableImplicitSignUp, which is likely an implementation oversight and not the intended behavior. The code and recent PRs confirm that disableImplicitSignUp is recognized and passed to the provider logic, but the order of checks prevents requestSignUp from working as expected in this scenario ([PR #4395](https://github.com/better-auth/better-auth/pull/4395)). There isn't an official workaround documented. If you need to allow explicit sign-up via OAuth while blocking implicit sign-up, you may need to temporarily toggle disableImplicitSignUp or handle user creation after authentication as a workaround until the logic is updated. <!-- 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/372b797e-5b06-4856-b6ed-7f6172d231ed?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/372b797e-5b06-4856-b6ed-7f6172d231ed?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/372b797e-5b06-4856-b6ed-7f6172d231ed?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/372b797e-5b06-4856-b6ed-7f6172d231ed?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/372b797e-5b06-4856-b6ed-7f6172d231ed?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/372b797e-5b06-4856-b6ed-7f6172d231ed?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/372b797e-5b06-4856-b6ed-7f6172d231ed?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&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/5024)
Author
Owner

@ubinatus commented on GitHub (Oct 1, 2025):

Closing this as it got resolved after cleaning pnpm cache and reinstalling deps

<!-- gh-comment-id:3358307125 --> @ubinatus commented on GitHub (Oct 1, 2025): Closing this as it got resolved after cleaning pnpm cache and reinstalling deps
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10142