New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

parse-server-auth-firebase

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-server-auth-firebase

Firebase auth adapter for Parse Server

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Parse Server Auth Firebase

npm Snyk Vulnerabilities for npm package NPM

Note

This is a fork of Parse Server Firebase Package rewritten to adhere to custom authentication api exposed by Parse Server 4 and above.

Getting started

Install the module by npm

$ npm i -S parse-server-auth-firebase

or using yarn

$ yarn add parse-server-auth-firebase

Firebase Auth Adapter

Based on: https://github.com/parse-server-modules/parse-server-firebase-auth-adapter

FIREBASE_SERVICE_ACCOUNT_KEY="$(< firebaseAccountKey.json)"

FIREBASE_SERVICE_ACCOUNT_KEY can be specified as the string content of the credentials JSON file or can be specified as a path to the JSON file by using:

FIREBASE_SERVICE_ACCOUNT="/relative/to/project/serviceAccountKeyFilename.json"

Add adapter to your Parse Server Config

import { ParseServer } from 'parse-server'
...
const parserServer = new ParseServer({
  appId: "APP_ID",
  appName: "APP NAME",
  ...
  auth: {
    firebase: {
     module: "parse-server-auth-firebase"
   }
  }
})

Authenticate

curl -X POST \
  {{host}}/parse/users \
  -H 'content-type: application/json' \
  -H 'x-parse-application-id: {{ParseAppId}}' \
  -d '{
    "authData": {
    	"firebase": {
    		"access_token": "{{firebase_access_token}}",
    		"id": "{{firebase_user_uid}}"
    	}
    }
}'

Why so?

Based on previous adapters provided by the parse community this repository provides firebase auth adapter rewritten in TypesScript and newer features in JavaScript for Parse Server. It also uses the latest npm packages as of Oct 2023.

This package solves few issues. When setup firebase admin NodeJS SDK a credentials file is required. The previous adapters requires the credentials file to be specified by path. In some scenarios this is not applicable because track the credentials file into the version control system is not good. This package will combine and contains everything needed for all of the service integration supported with Parse Server. In addition provided by this package storage adapter adds support for streaming of files.

Keywords

parse

FAQs

Package last updated on 13 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts