Is it possible to do email/password auth with the REST API rather the SDKs? (without having to set up my own token server)
I can't find anything in the docs about it.
Is it possible to do email/password auth with the REST API rather the SDKs? (without having to set up my own token server)
I can't find anything in the docs about it.
Nope.
There is no public REST endpoint to authenticate users with email+password (or any other supported provider). When using the REST API, you will have to either mint your own tokens, use your Firebase's secret or get the token from somewhere else (e.g. passed from a client app to your code).
To Login POST
https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=<web-key>
Request Body:
{
"email": "email",
"password": "password",
"returnSecureToken": true
}
More on : Firebase Auth Docs
Yes you can do it! No idea why firebase docs are so retarded for REST. I checked how app generated with this https://github.com/firebase/generator-angularfire . And it uses REST in several cases. Dig deeper. I don't know about all params in this methods, but it works.
To login
GET
<url to your firebase instanse>/auth/password?&email=<email>&password=<password>&v=js-2.2.2&transport=json&suppress_status_codes=true
To sign up
POST
<url to your firebase instanse>/users?&email=<email>&password=<password>&_method=POST&v=js-2.2.2&transport=json&suppress_status_codes=true