Skip to content

Conversation

@MichaelVerdon
Copy link
Contributor

@MichaelVerdon MichaelVerdon commented Feb 4, 2026

Similar to #1321

Problem

Phone authentication failed with auth/internal-error because injectRecaptchaVerifier could return different RecaptchaVerifier instances for the same element. Using a different instance than the one rendered caused Firebase's _reset() to fail.

Solution

Cache the rendered verifier instance and always return the same instance for the same element. Prevent duplicate renders and add an SSR guard. Wait for render completion before calling verifyPhoneNumber.

  • Test also verifies this behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant