ThisIsRudigo / firebaseauth

Firebase authentication library - a node js wrapper around the Firebase REST API
42 stars 8 forks source link

FirebaseAuth initialization example on npm #13

Closed ionuttamas closed 6 years ago

ionuttamas commented 6 years ago

The initialization on npm should be with lowercase: var firebase = new FirebaseAuth(process.env.FIREBASE_API_KEY); should be: var firebase = new firebaseAuth(process.env.FIREBASE_API_KEY);

itswisdomagain commented 6 years ago

That depends on how you import (ES 6) or require (ES 5) the library. See below...

const FirebaseAuth = require('firebaseauth');
var firebase = new FirebaseAuth(process.env.FIREBASE_API_KEY);

or

import firebaseAuth from 'firebaseauth';
let firebase = new firebaseAuth(process.env.FIREBASE_API_KEY);