To authenticate a user using Custom Login, we must provide each client with a secure JWT that has been generated on a server. We provide several helper libraries for generating JWTs. Use a Firebase Secret to generate these tokens. Firebase Secrets can be found by logging into the Firebase account and clicking on the Security tab in the Firebase Dashboard.
This package is a wrapper to Firebase custom login including all dependencies with the exception of firebase it self.
More information your can find here.
Install via npm:
npm install firebase firebase-login-custom
var ref = new Firebase('https://<Your Firebase>.firebaseio.com');
FirebaseLoginCustom(firebaseRef, {
uid: <Your id>
},
{
secret: <Your secret>,
},
function (error, data) {
if (error !== null) {
console.log(error);
} else {
console.log(data.token);
}
}
);
Please report issues to ticket system. Pull requests are welcome here!
git flow feature start my-new-feature
)git commit -am 'Add code'
)git flow feature finish my-new-feature
)git push origin
)$ cd /path/to/firebase-login-email/
$ npm install
$ export FIREBASE_ID=<YOUR_TEST_ID>
$ export FIREBASE_SECRET=<123456abcdefg>
$ node tests/integration/firebase-login-custom-integration-child.js
$ node tests/integration/firebase-login-custom-integration-simple.js
$ node tests/integration/firebase-login-custom-integration-unique.js