Its possible to enable sign-in methods (like email and password, for example) in a firebase project with no use the console interface? I tried use a PATCH request to https://identitytoolkit.googleapis.com/admin/v2/projects/{project-id}/config?updateMask=signIn.email.enabled,signIn.email.passwordRequired , without success. Is it possible to be made with gcloud cli or API request?
A general-purpose mechanism for answering this type of question is to use a combination of:
I was intrigued by your question and tried this on my own project.
By adding, enabling and then deleting the Email provider in the Firebase Console, I was able to grab the underlying REST API calls against identitytoolkit.googleapis.com
.
Eg Adding uses projects.updateConfig :
/admin/v2/projects/${PROJECT}/config?updateMask=signIn.email.enabled,signIn.email.passwordRequired&alt=json&key=${API_KEY}
And a request body:
{
"signIn": {
"email": {
"enabled": true,
"passwordRequired": true
}
}
}
There are various request headers you may want to check, including:
authorization: SAPISIDHASH {VALUE}
I've not seen SAPISIDHASH
before but others have, see this answer.
So, you'll need to try to repro PATCH
ing the API using that updateMask
, your own API key, the body ( Config
) and some variant of those request headers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.