FirebaseExtended / make-it-so-android

Apache License 2.0
214 stars 58 forks source link

Error linking account #43

Open DonBraulio opened 11 months ago

DonBraulio commented 11 months ago

Hi, I'm following this tutorial and when I reach the Firebase Authentication step, I get the following snackbar error while trying to create an account:

The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section [ Please verify the new email before changing email. ]

However, in the Firebase Console I've already added the access provider for email/password (and the anonymous, which is added by default), both have a green tick saying correctly enabled.

I've recreated the Firebase project and the local code, and reproduced the steps (there are very few steps) as straightforward as possible, but I still get this error.

Any ideas of why this could be happening?

thatfiredev commented 11 months ago

@DonBraulio Sorry that you ran into that error.

And that seems to be a problem on our side: the linkWithCredential() method is currently broken due to a change in the way Cloud Identity works. Starting in September 15, Email Enumeration protection has been automatically enabled on new Firebase/Cloud projects which causes the error you're seeing. A workaround for now is to disable enumeration protection.

Our engineering team is working into addressing the issue so that the workaround is not needed. I will update this issue once I hear back from them.

collaxd commented 10 months ago

pls provide how to resolve it @thatfiredev, i'm new with android idk how, cos your link is for Node.js to continue curse

johananl commented 10 months ago

Workaround instructions which worked for me:

  1. Install gcloud: https://cloud.google.com/sdk/docs/install
  2. Run gcloud init, choose the correct Google account on the browser tab that gets automatically opened and authorize the SDK to access the account.
  3. Run export PROJECT_ID=my-project-id.
  4. Run export ACCESS_TOKEN=$(gcloud auth print-access-token --project=$PROJECT_ID).
  5. Run the following:
curl -X PATCH -d "{'emailPrivacyConfig':{'enableImprovedEmailPrivacy':false}}" \
    -H "Authorization: Bearer $ACCESS_TOKEN" \
    -H 'Content-Type: application/json' -H "X-Goog-User-Project: $PROJECT_ID" \
    "https://identitytoolkit.googleapis.com/admin/v2/projects/$PROJECT_ID/config?updateMask=emailPrivacyConfig"
johananl commented 10 months ago

@collaxd FYI ☝️

acrrafe commented 1 month ago

This help me fix the problem:

https://github.com/FirebaseExtended/make-it-so-android/issues/27#issuecomment-1906764071

image

DeocBrut commented 1 week ago

@thatfiredev This problem is still not fixed yet. Your work around works, but probably not the right thing to do to disable enumeration.