question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API Key not found error

See original GitHub issue

Hello,

I am following the README instructions very closely but cannot get email/password authentication to work for the life of me:

import React, { Component } from "react";

import StyledFirebaseAuth from "react-firebaseui/StyledFirebaseAuth";
import firebase from "firebase";

const config = {
  // Copied directly from the Firebase console...
};
firebase.initializeApp(config);

const firebaseUIConfig = {
  signInOptions: [
    {
      provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
      requireDisplayName: false,
      signInMethod: firebase.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD
    }
  ],
  tosUrl: "https://irace.me",
  privacyPolicyUrl: "https://irace.me"
};

class App extends Component {
  render() {
    return <StyledFirebaseAuth uiConfig={firebaseUIConfig} firebaseAuth={firebase.auth()} />;
  }
}

When choosing my email address from the dropdown, I get the following error:

[  5.887s] [firebaseui] Internal error: {"error":{"code":400,"message":"API Key not found. Please pass a valid API key.","errors":[{"message":"API Key not found. Please pass a valid API key.","domain":"global","reason":"badRequest"}],"status":"INVALID_ARGUMENT"}}

When looking at the HTTP traffic, I see that the API key is in fact present:

image

Any ideas? Totally stuck on this – thanks in advance!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
jeroenpelgrimscommented, Jul 31, 2019

In my case the issue was that I had previously created a project with the same name. Take a look here: https://console.developers.google.com/cloud-resource-manager I had 2 projects there that somehow conflicted with each other.

For me, since this was a new project, the easiest solution was to delete the entire project (in firebase AND in the cloud resource manager) and then create it from scratch.

3reactions
mephixcommented, Jul 31, 2019

hi guys, I figured it out without having to delete my project. The solution was “REGENERATE KEY” in the top right of the screenshot below. Screenshot 2019-07-31 at 14 43 57 Note that I also renamed my project as per @resurge , so the solution may be these two things in combination.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RuntimeException: API key not found. Check that geo ...
1 · map is blank because you have not activated the google map at console. · It's telling me there is an authorization...
Read more >
Error Messages | Maps JavaScript API - Google Developers
The API key included in the script element that loads the API is not found. Please make sure you are using a correct...
Read more >
java.lang.RuntimeException: API key not found. #28719 - GitHub
I am getting error when i add Google Map API key in AndroidManifest.xml ... Unhandled Exception: PlatformException(error, API key not found.
Read more >
Invalid API Key (Key not found) - WordPress.org
Please provide me a screenshot of the error. If you are getting an invalid API key error, it is likely due to some...
Read more >
Unable to use API Key created - 404 Not Found
However with dashboard 2 , I have created the API key but I receive 404 error on using via Postman and even via...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found