I am trying to create an account for a user using Firebase functions and Firebase admin. When trying to create an account I get the following error:
Access Not Configured. Google Identity Toolkit API has not been used in project 252096998845 before or it is disabled. Enable it by visiting https://...
The thing is, the project number it gives me in the error message if different from my current project number. Somehow it has the wrong project? All my other functions runs fine with no issues on my current project.
I've visited the URL it gives me, but the project obviously doesn't exist
This project was migrated from the 'old' Firebase, if that matters at all.
EDIT: The appropriate sign in method is already enabled. I am using the NodeJS Admin SDK. I've already tried to select my project in the Google Console and look for the Identity Toolkit API, but it is already enabled.
Full error:
An internal error has occurred. Raw server response: "{"error":{"errors":[{"domain":"usageLimits","reason":"accessNotConfigured","message":"Access Not Configured. Google Identity Toolkit API has not been used in project 252096998845 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=252096998845 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.","extendedHelp":"https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=252096998845"}],"code":403,"message":"Access Not Configured. Google Identity Toolkit API has not been used in project 252096998845 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=252096998845 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."}}"
答案 0 :(得分:2)
我用admin.inializeApp(functions.config().firebase)
初始化了我的应用。使用
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://XYZ.firebaseio.com/',
storageBucket: 'gs://project-XYZ.appspot.com/'
});
方法修复了它。
答案 1 :(得分:0)
go to your firebase account and find this
authentication -> sign-in method
it will display many sign in method like facebook, phone, google etc .. enable google sign-in method and try again.