Firebase 3.3.x Nodejs - createUserWithEmailAndPassword is not a function

I saw a lot of questions about this, but what bothers me is the documentation firebase x nodejs there is a function createUserWithEmailAndPassword().

Each time I print firebase.auth(), it has only the following functions:

{ 
    createCustomToken: [Function],
    verifyIdToken: [Function],
    INTERNAL:{ 
        delete: [Function],
        getToken: [Function],
        addAuthTokenListener: [Function],
        removeAuthTokenListener: [Function] 
    } 
}

Also, in the same documentation, nodejs firebase.auth () says:

auth (application) returns firebase.auth.Auth

Gets the Auth object for the default application or this application.

Using:

firebase.auth () firebase.auth (application)

So, I assumed that the call firebase.auth()would return firebase.auth.Auth , which supposedly contains createUserWithEmailAndPassword .

, firebase firebase.initializeApp(), , Im database JSYK.

+4
1

Firebase SDK Node.js ( 3.3):

  • SDK, , ,

    firebase.initializeApp({
      serviceAccount: "myproject-3d9889aaeddb.json",
      databaseURL: "https://myproject.firebaseio.com"
    });
    

    ( , 3.2 ), , admin auth function: .

  • SDK, API

    firebase.initializeApp({
      apiKey: "myprojectsApiKey",
      databaseURL: "https://myproject.firebaseio.com"
    });
    

    API ( 3.3),

    . .

+8

Source: https://habr.com/ru/post/1653782/


All Articles