Skip to content

RecaptchaVerifier failes when the ui is initialized using the new functional structure of the firebase SDK #971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
meena-erian opened this issue Sep 1, 2022 · 5 comments
Labels
v9-migration Issues related to updating to v9 modular SDK

Comments

@meena-erian
Copy link

[REQUIRED] Describe your environment

  • Operating System version: Windows 11
  • Browser version: Chrome 104
  • Firebase UI version: 6.0.1
  • Firebase SDK version: 9.9.3

[REQUIRED] Describe the problem

When following the instructions as documented to create the UI with phone sign-in with the latest version of firebase SDK, the Recaptcha doesn't show on the screen and the browser's consol shows the error:

recaptcha_verifier.ts:46 Uncaught TypeError: app.auth is not a function
    at new RecaptchaVerifier (recaptcha_verifier.ts:46:1)
    at H.phoneSignInStart (esm.js:344:1)
    at I (esm.js:173:1)
    at esm.js:353:1
    at b (esm.js:353:1)
    at esm.js:7:1
    at Rn.<anonymous> (esm.js:198:1)
    at De (esm.js:71:1)
    at Ce (esm.js:70:1)
    at mj (esm.js:179:1)

Steps to reproduce:

  1. initialize the app using the new import { initializeApp } from "firebase/app"; rather than the old approach;
import firebase from "firebase/compat/app";
firebase.initializeApp(firebaseConfig)";
  1. get the Auth instance using the new functional approach import { getAuth } from "firebase/auth"; rather than the old firebase.auth() approach
  2. initialize the ui using the auth instance as retrieved in step 2 var ui = new firebaseui.auth.AuthUI(getAuth(app));

Please let me know if this is not the kind of auth instance I'm supposed to path to the AuthUI method. Or how else am I supposed to get it to work with the new SDK?

@Jerit3787
Copy link

Jerit3787 commented Sep 1, 2022

This is an known issue and related to #961. This issue yet haven’t received any feedback from the team. Use v8 as an alternative

@leolux
Copy link

leolux commented Sep 14, 2022

This is an known issue and related to #961. This issue yet haven’t received any feedback from the team. Use v8 as an alternative

@Jerit3787 Is there no workaround or dirty hack to get the RecaptchaVerifier use the v9 style?

@Jerit3787
Copy link

This is an known issue and related to #961. This issue yet haven’t received any feedback from the team. Use v8 as an alternative

@Jerit3787 Is there no workaround or dirty hack to get the RecaptchaVerifier use the v9 style?

Not yet. This is due to the recaptcha still utilising compat. Therefore there is still issue with it.

@leolux
Copy link

leolux commented Oct 11, 2022

The last commit on this project was on 23th Feb 2022. Has google stopped maintaining this project?

@krisgerhard
Copy link

@prameshj

@jhuleatt jhuleatt added the v9-migration Issues related to updating to v9 modular SDK label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v9-migration Issues related to updating to v9 modular SDK
Projects
None yet
Development

No branches or pull requests

5 participants