Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom auth get 400 error with CONFIGURATION_NOT_FOUND #534

Open
SLdragon opened this issue Jan 29, 2021 · 8 comments
Open

Custom auth get 400 error with CONFIGURATION_NOT_FOUND #534

SLdragon opened this issue Jan 29, 2021 · 8 comments

Comments

@SLdragon
Copy link

Follow the document to run custom auth code, but get the errors as below, did I miss something to config?

{
   "code":"auth/internal-error",
   "message":{
      "error":{
         "code":400,
         "message":"CONFIGURATION_NOT_FOUND",
         "domain":"global",
         "reason":"invalid"
      }
   }
}
@samtstern
Copy link
Contributor

Can you explain the steps you took to get to this error more exactly? "Follow the document to run custom auth code" is not enough information for me to try and reproduce or debug this issue.

@joeauty
Copy link

joeauty commented Feb 11, 2021

I'm having this issue too...

I hope the original poster doesn't mind my answering his question. If our cases are different, I'll be sure to create a new ticket so that I don't hijack this one.

I'm using custom authentication, i.e. generating a token within my server/Node.js app running the Admin SDK:

const token = await firebaseAdmin.auth().createCustomToken(req.currentUser.uuid);

this code returns a token to my client application. The req.currentUser.uuid is a UUID belonging to that user. Client side I'm doing this:

return firebase.auth().signInWithCustomToken(data.firebaseToken);

data.firebaseToken is the token provided from the above step. The response:

code: "auth/internal-error"
message: "{"error":{"code":400,"message":"CONFIGURATION_NOT_FOUND","errors":[{"message":"CONFIGURATION_NOT_FOUND","domain":"global","reason":"invalid"}]}}"

My client application is registered and working fine without authentication, so the Firebase config file should be correct (it is unchanged from what is provided in the console). Here is the client side init:

import firebase from "firebase/app";
import "firebase/auth";
import { firebaseConfig } from "../firebaseConfig";
firebase.initializeApp(firebaseConfig);

Thanks in advance for helping us out!

@joeauty
Copy link

joeauty commented May 6, 2021

Came across a fix for this... Simply visit the "Authentication" section of the Firebase console and click "enable". You don't have to configure any identity providers, but this error means that an identity provider was not found, perhaps because this API was simply not enabled.

@ZYinMD
Copy link

ZYinMD commented Sep 3, 2021

Maybe the firebase console UI has changed since the last reply, but I went to the firebase console -> authentication, then clicked "Get Started". And that's all.

@SLdragon
Copy link
Author

SLdragon commented Sep 6, 2021

Thanks, seems this error is due to authentication is not enabled, thanks all for help!

@Jenishk56
Copy link

Is there a way to automate the enabling Email/Password Authentication from Firebase ? Need to do this in multiple project and any automation around would be helpful. Tried looking for Firebase API for the same. No luck so far.

Please help if anyone found solution to make it fully automated.

@istiaque-a
Copy link

@Jenishk56 , Go to Authentication -> Sign-in method. Then enable the Email/Password Provider

@drecali
Copy link

drecali commented Oct 20, 2022

Thanks @joeauty! That fixed the issue for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants