# simple-firebase-auth

> Simplified Firebase authentication with social platform support

Latest version **0.0.8** (published 2016-11-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-firebase-auth
pnpm add simple-firebase-auth
yarn add simple-firebase-auth
bun add simple-firebase-auth
```

## 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.8 |
| Published | 2016-11-27 |
| First published | 2016-10-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | SSG |
| Maintainers | ssg-luke |
| Keywords | auth, social, facebook, login, google, firebase |

## Links

- npm: https://www.npmjs.com/package/simple-firebase-auth
- Repository: https://github.com/SolidStateGroup/simple-firebase-auth
- Homepage: https://github.com/SolidStateGroup/simple-firebase-auth#readme
- Issues: https://github.com/SolidStateGroup/simple-firebase-auth/issues
- npm.io page: https://npm.io/package/simple-firebase-auth

## 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.8 (latest) — 2016-11-27
- 0.0.7 — 2016-11-25
- 0.0.6 — 2016-11-15
- 0.0.5 — 2016-11-15
- 0.0.4 — 2016-11-15
- 0.0.3 — 2016-11-15
- 0.0.2 — 2016-10-07
- 0.0.1 — 2016-10-07

## README

# Simple Firebase Auth

Simplified Firebase authentication for web with support for Facebook & Google login. 

Using this module alongside Firebase means there is no need to write and host any backend code to handle users logging in to your app.

Use our project starter repository (https://github.com/SolidStateGroup/firebase-project-starter) to help you get started setting up your own Firebase project.

## Install
```
$ npm install --save firebase simple-firebase-auth
```

## Project Setup

You will need to initialise Firebase within your app in the usual way. See https://firebase.google.com/docs/web/setup

## Example Usage (with React)

```
import FireAuth from 'simple-firebase-auth';

constructor(props) {
  super(props);
  FireAuth.init({
    fbAppId: "<FACEBOOK_APP_ID>",
    webClientId: "<FIREBASE_WEB_CLIENT_ID>",
    apiKey: "<FIREBASE_API_KEY>"
  });
}

componentDidMount() {
  FireAuth.setup(this.onLogin, this.onUserChange, this.onLogout, this.emailVerified, this.onError);
}

register = () => {
  const { email, password, firstName, lastName } = this.state;
  FireAuth.register(email, password, { firstName, lastName });
}

login = () => {
  FireAuth.login(this.state.email, this.state.password);
}

facebookLogin() {
  FireAuth.facebookLogin();
}

googleLogin() {
  FireAuth.googleLogin();
}

logout() {
  FireAuth.logout();
}

update () => {
  FireAuth.update({
    firstName: this.state.firstName,
    lastName: this.state.lastName
  }).then(() => {
    ...
  }).catch(err => {
    ...
  });
}

resetPassword () => {
  FireAuth.resetPassword(this.state.email)
    .then(() => {
      ...
    })
    .catch(err => {
      ...
    });
}

updatePassword () => {
  FireAuth.updatePassword(this.state.password)
    .then(() => {
      ...
    })
    .catch(err => {
      ...
    });
}

```

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