The [cancelOnTapOutside] function stopped working for OneTap after upgrading to version 1.4 or later. #2637

Closed
opened 2026-03-13 10:10:00 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @itisvincent on GitHub (Jan 1, 2026).

Originally assigned to: @bytaesu on GitHub.

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. using oneTapClient in your webapp
  2. config cancelOnTapOutside: true (but default is true)
  3. call authClient.oneTap

Current vs. Expected behavior

Current
Clicking outside does not dismiss the onetap.

Expected behavior:
clicking outside should dismiss the onetap.

What version of Better Auth are you using?

1.4.10

System info

linux

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

Client

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @itisvincent on GitHub (Jan 1, 2026). Originally assigned to: @bytaesu on GitHub. ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce 1. using oneTapClient in your webapp 2. config cancelOnTapOutside: true (but default is true) 3. call authClient.oneTap ### Current vs. Expected behavior Current Clicking outside does not dismiss the onetap. Expected behavior: clicking outside should dismiss the onetap. ### What version of Better Auth are you using? 1.4.10 ### System info ```bash linux ``` ### Which area(s) are affected? (Select all that apply) Client ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 10:10:00 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 1, 2026):

It seems there's an issue with the cancelOnTapOutside function not working as intended in version 1.4.10 of Better Auth, specifically when using oneTapClient. From your description, when cancelOnTapOutside is set to true, clicking outside is expected to dismiss the OneTap interface, but it's not functioning as expected.

As of now, I couldn't find any specific documentation or issue related to this bug directly in the provided search results. However, it might be beneficial to check if there are updates or fixes related to this in recent releases or upcoming updates.

You could also consider reaching out to the Better Auth team by tagging @bekacru or @ping__ for insights specific to this issue.

What have you tried so far in troubleshooting this issue? Would you like help with any other specific aspects of the Better Auth framework?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Jan 1, 2026): It seems there's an issue with the `cancelOnTapOutside` function not working as intended in version 1.4.10 of Better Auth, specifically when using `oneTapClient`. From your description, when `cancelOnTapOutside` is set to true, clicking outside is expected to dismiss the OneTap interface, but it's not functioning as expected. As of now, I couldn't find any specific documentation or issue related to this bug directly in the provided search results. However, it might be beneficial to check if there are updates or fixes related to this in recent releases or upcoming updates. You could also consider reaching out to the Better Auth team by tagging @bekacru or @ping__ for insights specific to this issue. What have you tried so far in troubleshooting this issue? Would you like help with any other specific aspects of the Better Auth framework? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Author
Owner

@dosubot[bot] commented on GitHub (Jan 1, 2026):

Hi @itisvincent! I'm Dosu and I’m helping the better-auth team.

This is suited for GitHub. The code still passes the cancelOnTapOutside option to the Google One Tap API, but starting in 1.4.x, the client aggressively re-prompts with exponential backoff whenever the prompt is dismissed or skipped. This can make it seem like clicking outside does nothing, even if Google's own cancel flag is set. There are no explicit code changes or merged pull requests that mention a change to this behavior, but the new re-prompting logic is likely responsible for what you're seeing. There are also existing issues discussing similar OneTap dismissal problems and client-side omissions in handling prompt dismissals, but none directly address this regression in 1.4.10. If you need a workaround, you could try adjusting the promptOptions (like maxAttempts) or temporarily downgrading to a version before 1.4.x where the aggressive re-prompting was not present.
Reference: oneTapClient implementation
Related discussion of OneTap dismissal issues

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 1, 2026): <!-- Greeting --> Hi @itisvincent! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> This is suited for GitHub. The code still passes the `cancelOnTapOutside` option to the Google One Tap API, but starting in 1.4.x, the client aggressively re-prompts with exponential backoff whenever the prompt is dismissed or skipped. This can make it seem like clicking outside does nothing, even if Google's own cancel flag is set. There are no explicit code changes or merged pull requests that mention a change to this behavior, but the new re-prompting logic is likely responsible for what you're seeing. There are also existing issues discussing similar OneTap dismissal problems and client-side omissions in handling prompt dismissals, but none directly address this regression in 1.4.10. If you need a workaround, you could try adjusting the promptOptions (like maxAttempts) or temporarily downgrading to a version before 1.4.x where the aggressive re-prompting was not present. [Reference: oneTapClient implementation](https://github.com/better-auth/better-auth/blob/4bf85c648f0e964f91c5a795d1e3504e288ae47a/packages/better-auth/src/plugins/one-tap/client.ts#L203-L315) [Related discussion of OneTap dismissal issues](https://github.com/better-auth/better-auth/issues/1415) <!-- 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/0541840c-8ceb-4cca-89b6-cedcc0ba7450?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0541840c-8ceb-4cca-89b6-cedcc0ba7450?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0541840c-8ceb-4cca-89b6-cedcc0ba7450?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0541840c-8ceb-4cca-89b6-cedcc0ba7450?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0541840c-8ceb-4cca-89b6-cedcc0ba7450?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0541840c-8ceb-4cca-89b6-cedcc0ba7450?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0541840c-8ceb-4cca-89b6-cedcc0ba7450?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20suited%20for%20GitHub.%20The%20code%20still%20passes%20the%20%60cancelOnTapOutside%60%20option%20to%20the%20Google%20One%20Tap%20API%2C%20but%20starting%20in%201.4.x%2C%20the%20client%20aggressively%20re-prompts%20with%20exponential%20backoff%20whenever%20the%20prompt%20is%20dismissed%20or%20skipped.%20This%20can%20make%20it%20seem%20like%20clicking%20outside%20does%20nothing%2C%20even%20if%20Google%27s%20own%20cancel%20flag%20is%20set.%20There%20are%20no%20explicit%20code%20changes%20or%20merged%20pull%20requests%20that%20mention%20a%20change%20to%20this%20behavior%2C%20but%20the%20new%20re-prompting%20logic%20is%20likely%20responsible%20for%20what%20you%27re%20seeing.%20There%20are%20also%20existing%20issues%20discussing%20similar%20OneTap%20dismissal%20problems%20and%20client-side%20omissions%20in%20handling%20prompt%20dismissals%2C%20but%20none%20directly%20address%20this%20regression%20in%201.4.10.%20If%20you%20need%20a%20workaround%2C%20you%20could%20try%20adjusting%20the%20promptOptions%20%28like%20maxAttempts%29%20or%20temporarily%20downgrading%20to%20a%20version%20before%201.4.x%20where%20the%20aggressive%20re-prompting%20was%20not%20present.%20%20%0A%5BReference%3A%20oneTapClient%20implementation%5D%28https%3A//github.com/better-auth/better-auth/blob/4bf85c648f0e964f91c5a795d1e3504e288ae47a/packages/better-auth/src/plugins/one-tap/client.ts%23L203-L315%29%20%20%0A%5BRelated%20discussion%20of%20OneTap%20dismissal%20issues%5D%28https%3A//github.com/better-auth/better-auth/issues/1415%29)&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/7084)
Author
Owner

@bytaesu commented on GitHub (Jan 8, 2026):

Hi @itisvincent,

I'm checking this

@bytaesu commented on GitHub (Jan 8, 2026): Hi @itisvincent, I'm checking this
Author
Owner

@bytaesu commented on GitHub (Jan 9, 2026):

Hi @itisvincent,

when using FedCM mode, JavaScript configurations like cancelOnTapOutside may not work. To ensure these always work, you can consider disabling promptOptions.fedCM, which is enabled by default.

I updated the docs for clearer guidance 🙂

@bytaesu commented on GitHub (Jan 9, 2026): Hi @itisvincent, when using FedCM mode, JavaScript configurations like `cancelOnTapOutside` may not work. To ensure these always work, you can consider disabling `promptOptions.fedCM`, which is enabled by default. I updated the docs for clearer guidance 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2637