Firebase authentication - expired api key

firebase api key
firebase api key security
firebase auth rest api
firebase api key hackerone
api key has expired firebase
what is firebase
firebase google sign in
firebase projects

i am developing a serverless client app that uses Firebase authentication and other services from Google. It was all working nicely, when suddely the FB login authentication stopped working. It happens that when try to login the user i obtain a 400 BADREQUEST with the following body:

{
    "error": {
        "code": 400,
        "message": "API key expired. Please renew the API key.",
        "errors": [{
            "message": "API key expired. Please renew the API key.",
            "domain": "global",
            "reason": "badRequest"
        }],
        "status": "INVALID_ARGUMENT"
    }
}

The url causing the problem is:

https://www.googleapis.com/identitytoolkit/v3/relyingparty/getProjectConfig?key=AIzaSyDXJ1Lwo_Md0xZzFfPX9Y8dQWOaODE4uiM&cb=1534851951010

Some weird things:

  • i tested with totally different projects (so brand new keys): still failing
  • if i go to cloud console i found several unrestricted keys automatically created by Google (i attach a screenshot)

I also created a brand new app and executed it locally. Same outcome.

Any ideas ?

Add: i have just discovered that the Identity API is effectively returning me 100% failures at the moment.

I was able to get this issue as well and this helped me solve my issue:

  1. Go to google api console and find the key: Android key (auto created by Google Service). These keys are automatically generated by Firebase when you choose the option: Email/password in authentication. Copy that key.

  2. Go to the google-services.json in your android studio under the projects section. Click on the file and look for the api_key -> current_key. Modify that value with the api key in step 1.

should I regularly change the Firebase API key when it expired , it is said my API key is expired, fortunately I can solve the problem by following the solution in here: Firebase authentication - expired api key. Admin Authentication API Errors. auth/id-token-expired: The provided Firebase ID token is expired. The hash derived key length must be a valid number.

I Was able to resolve the issue by going into my firebase project settings> General> update my old API key with the Web API key value.

Firebase Auth REST API - Firebase, API Reference. CLI Reference Overview · ActionCodeInfo · ActionCodeSettings · ActionCodeURL · AdditionalUserInfo · Auth · AuthCredential  Overview; auth:import and auth:export; Firebase Realtime Database Operation Types; Deploy Targets

I had the same problem, i fixed it by: Resetting my project, which included... Deleting the Google-Services.json file, replacing the SHA1 key, syncing and adding the new Google-Services.json file on my project. hope it helps you.

Cheers

Admin Authentication API Errors, auth/id-token-expired, The provided Firebase ID token is expired. auth/id-token- auth/invalid-hash-key, The hash key must a valid byte buffer. Firebase Error: auth/invalid-api-key, Your API key is invalid, please check you have copied it correctly. #61 ghost opened this issue Sep 15, 2016 · 28 comments Comments

Firebase authentication - expired api key - firebase - html, i am developing a serverless client app that uses Firebase authentication and other services from Google. It was all working nicely, when suddely the FB login  It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more. Firebase Authentication integrates tightly with other Firebase services, and it leverages industry standards like OAuth 2.0 and OpenID Connect, so it can be easily integrated with your custom backend.

Firebase - What is the API Key, Ionic version: v1.3.1 AngularFire: 2.0.2 Firebase js: v3.3.0 Build: 3.3.0-rc.7 Issue: I am using the Firebase Error: auth/invalid-api-key, Your API key is invalid, please check you have copied it correctly. #61 API key expired. The Firebase SDKs handle all authentication and communication with the Firebase Realtime Database on your behalf. However, when you're in an environment that doesn't have a client SDK or you want to avoid the overhead of a persistent database connection, you can make use of the Realtime Database REST API to read and write data.

Installation & Setup for REST API, Why the current Firebase API, is forcing the client to refresh the Auth token so people can download it, it will fail because my apiKey expires. To learn more about authenticating to a Google Cloud API, see Authentication overview. For information about API keys for Google Maps Platform APIs and SDKs, see the Google Maps documentation . Note: Do not use API keys for local or production applications, except in the specific cases described below.

Comments
  • Try creating a new browser API key.
  • Apparently there was an error with a key; support has fixed it but i escalated it because i have not understood what the problem was. I'll update the answer as soon as i have new info.
  • I'm getting this all of a sudden too... Any news?
  • Hi, not yet. As i stated in the previous comment, 'a key expired', but if you followed the project docs there's nothing to be created explicitly and also no manual key management is supposed to happen, so i escalated and i am waiting from the support. This needs to be understood if we want to go live with solutions built on top of Firebase.
  • Final update. According to the customer support, a key has been effectively deleted. Now, i don't remember such an action, and i also think that it must be properly clear what is happening when you are doing it. Anyway, for the records, if you might be experiencing the same problem i had, remember to inspect the keys.
  • I did the same and it didn't work. I then also did run a "Clean Project" on Android studio and it worked! At last. Thanks for solution!
  • you don't have to click update, it will probably already be different.