parse-server-firebase-phone-auth
v1.0.13
Published
A module to login users in parse server with phone number using Firebase Auth.
Downloads
25
Readme
parse-server-firebase-phone-auth
An module to login users in parse server with phone numbers using Firebase Auth.
Get Your Service Account From Firebase Console
- Go to https://console.firebase.google.com if you doesn't have an Developer Account register one then go to the next step if you already have one, then just go to the next step
- Select or create your App in developer Console.
- Go to this link: https://console.firebase.google.com/u/0/project/_/settings/serviceaccounts/adminsdk
- Click on click in your Project and in GENERATE NEW PRIVATE KEY
- Save the file as
firebaseServiceAccount.json
Install Module (Server Side)
- Open tour SSH client and enter your credentials
- Go to your parse-server-example folder and run eg. $ cd /home/demo/parse-server-exemple
npm i --save parse-server-firebase-phone-auth
Copy the
firebaseServiceAccount.json
from Firebase into your folder, ex. root of your project's folder.Edit the index.js file in parse-server-example and configure ParseServer with oauth, you can find this in parse server docs https://github.com/ParsePlatform/parse-server/wiki/OAuth Make sure to setup the accountkit oauth when starting your parse server:
var api = new ParseServer({
...
auth: {
firebase: {
module: 'parse-server-firebase-phone-auth',
serviceAccount: 'path/to/firebaseServiceAccount.json',
databaseURL: 'https://yourAppId.firebaseio.com'
}
}
});
Client Side (React Native)
- You'll need to install rnfirebase and rnfirebase auth