Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to add grepper answer

Hi All if you are getting this error:

error: Error [firebase_auth/internal-error] {"error":{"code":400,"message":"API key not valid. Please pass a valid API key.","errors":[{"message":"API key not valid. Please pass a valid API key.","domain":"global","reason":"badRequest"}],"status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.ErrorInfo","reason":"API_KEY_INVALID","domain":"googleapis.com","metadata":{"service":"identitytoolkit.googleapis.com"}}]}}


this means you are trying to run app on web chrome and in your flutter app this is not configure so follow below steps:

 1. Go to https://console.firebase
 2. Select your project name i.e. "E-Commerce App"
 3. Select Add App option from dashboard select platform (flutter/android/ios/web) from this select flutter
 4. Add Firebase to your Flutter app this screen will open then select next
 5. From any directory, run this command:"dart pub global activate flutterfire_cli"
 6. Then, at the root of your Flutter project directory, run this command:"flutterfire configure --project=eshop-a44ca"
 7. After "flutterfire configure" check npm

add this in main.dart file: 
await Firebase.initializeApp(
		 options: DefaultFirebaseOptions.currentPlatform,
	 );

 8. Run this command in your project directory npm install -g firebase-tools
9.Again run this command ""flutterfire configure --project=eshop-a44ca" you will see below screen [firebase options file created in lib folder]


 9. now you can sign up/register user successfully 
 10. [user created on firestore database ]


  [1]: https://i.stack.imgur.com/NBiDz.png
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #add #grepper #answer
ADD COMMENT
Topic
Name
6+3 =