Firebase Auth - Unhandled Exception: [firebase_auth/admin-restricted-operation] This operation is restricted to administrators only

Viewed 928

I'm running a Android in on Flutter 2.2.3 and using Firebase for authentication. When trying to authenticate anonymously, I keep running an error message Unhandled Exception: [firebase_auth/admin-restricted-operation] This operation is restricted to administrators only.

Anonymous authentication is enabled on the console. The iOS version of the app is able to log in anonymously. I've tried flutter clean, wiping my emulator, creating a new emulator, and even restarting my PC, all to no avail. As far as I can tell, the Android app is setup correctly. I'm not sure where else to look or what else to try at this point. Any help would be must appreciated.

1 Answers

Key points to look out for:

  • Added google-servies.json file to the android/app folder
  • Added all the dependencies in the build.gradle files both in the android and android/app folder
  • Enabled sign in anonymously in firebase console

Since your app is working fine in iOS it could be that you have not correctly configured the android side for things. Try double checking everything and follow the instructions from flutter fire.

Related