# parse-server-firebase-auth-adapter

> Authenticate to parse server with Firebase

Latest version **0.0.4** (published 2018-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-server-firebase-auth-adapter
pnpm add parse-server-firebase-auth-adapter
yarn add parse-server-firebase-auth-adapter
bun add parse-server-firebase-auth-adapter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2018-09-25 |
| First published | 2017-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Parse |
| Maintainers | ranhsd |
| Keywords | firebase, parse, auth |

## Links

- npm: https://www.npmjs.com/package/parse-server-firebase-auth-adapter
- Repository: https://github.com/parse-server-modules/parse-server-firebase-auth-adapter
- Homepage: https://github.com/parse-server-modules/parse-server-firebase-auth-adapter#readme
- Issues: https://github.com/parse-server-modules/parse-server-firebase-auth-adapter/issues
- npm.io page: https://npm.io/package/parse-server-firebase-auth-adapter

## Dependencies (1)

- [firebase-admin](https://npm.io/package/firebase-admin.md) ^6.0.0

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2018-09-25
- 0.0.3 — 2017-02-26
- 0.0.2 — 2017-02-23
- 0.0.1 — 2017-01-28

## README

# Parse-server-firebase-auth-adapter
Authenticate to parse server with your Firebase account

## How to use it?
### 1) Install the module
```js
npm i -S parse-server-firebase-auth-adapter
```
### 2) Add environment variables
* Copy the `firebaseAccountKey.json` from Firebase into your folder, maybe root of your project's folder.
* Add new environment into your `.env` or using export in your terminal.
```js
// 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"
```
### 3) Add this module when creating `ParseServer`
```js
import { ParseServer } from 'parse-server'
import firebaseAuthAdapter from 'parse-server-firebase-auth-adapter'
...
const parserServer = new ParseServer({
  ...
  auth: {
    firebase: firebaseAuthAdapter
  }
})
```
### 4) Using Firebase access token in our project
* Get Parse access token by POST a raw data to `/parse/users`
```sh
curl -X POST \
  {{host}}/parse/users \
  -H 'content-type: application/json' \
  -H 'x-parse-application-id: {{ParseAppId}}' \
  -d '{
    "authData": {
    	"firebase": {
    		"access_token": "{{access_token}}",
    		"id": "{{FirebaseUID}}"
    	}
    }
}'
```

---
_Source: https://npm.io/package/parse-server-firebase-auth-adapter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
