Home > other >  Difference between Firebase Auth REST API and Firebase methods like (createUserWithEmailAndPassword
Difference between Firebase Auth REST API and Firebase methods like (createUserWithEmailAndPassword

Time:12-25

Difference between:

  1. fetch( 'https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=AIzaSyBZhsabDexE9BhcJbGxnZ4DiRlrCN9xe24', { method: 'POST', body: JSON.stringify({ email: enteredEmail, password: enteredPassword, returnSecureToken: true, }), headers: { 'Content-Type': 'application/json', }, }

and

  1. Using auth.createUserWithEmailAndPassword

CodePudding user response:

The Firebase Auth SDK is just a convenience wrapper around the REST API, so they perform exactly the same function. Use whichever one you are most comfortable with. The SDK is designed to be easier to use for native web and mobile apps.

  • Related