1.0.0 • Published 6 years ago

parse-server-phone-firebase-auth v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Parse-Server-phone-Firebase-auth

An module to login users in parse server with phone numbers using Firebase Auth.

Install Module (Server Side)

  1. Open tour SSH client and enter your credentials
  2. Go to your Parse-server-exemple folder and run eg. $ cd /home/demo/parse-server-exemple
npm i -S parse-server-phone-firebase-auth
  1. Copy the firebaseAccountKey.json from Firebase into your folder, maybe root of your project's folder.
  2. Add new environment into your .env or using export in your terminal.
// firebaseAccountKey.json store in root of project.
FIREBASE_SERVICE_ACCOUNT_KEY = '../../firebaseAccountKey.json'

// URL for connect to Firebase database.
FIREBASE_DATABASE_URL = "https://SOME_ID.firebaseio.com"
  1. 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-phone-firebase-auth',
        serviceAccount: 'path/to/serviceAccountKey.json',
        databaseURL: 'https://yourAppId.firebaseio.com'
        }
    }
});

Get FirebaseAccount.json in firebase Conseole

  1. Go to https://console.firebase.google.com if you not have an Developer Account register one then go to the next step if you already have one, then just go to the next step
  2. Select or create your App in developer Console.
  3. Go to this link: https://console.firebase.google.com/u/0/project/_/settings/serviceaccounts/adminsdk
  4. Click on click in your Project and in GENERATE NEW PRIVATE KEY
  5. Save the file and also use it Step # 4

Cliente Side (Android)

  1. Soon...

Cliente Side (iOS)

  1. Soon...

Cliente Side (Web)

  1. Soon...

Note. Ww will update this repo as soon possible.