# firemaker

> Simplifies Firebase's email & password and email Link authentication methods with a promise based approach.

Latest version **1.0.4** (published 2018-07-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install firemaker
pnpm add firemaker
yarn add firemaker
bun add firemaker
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2018-07-17 |
| First published | 2018-07-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Eckhardt Dreyer |
| Maintainers | eckidevs |
| Keywords | Rainmaker, Firebase, Authentication |

## Links

- npm: https://www.npmjs.com/package/firemaker
- Repository: https://github.com/Eckhardt-D/firemaker
- Homepage: https://github.com/Eckhardt-D/firemaker#readme
- Issues: https://github.com/Eckhardt-D/firemaker/issues
- npm.io page: https://npm.io/package/firemaker

## Dependencies (1)

- [firebase](https://npm.io/package/firebase.md) ^5.2.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

- 1.0.4 (latest) — 2018-07-17
- 1.0.3 — 2018-07-16
- 1.0.2 — 2018-07-08
- 1.0.1 — 2018-07-08
- 1.0.0 — 2018-07-08

## README

# Firemaker 

## A module that simplifies the usage of Firebase's email and password login as well as the email link method.

#### This package is optimized for use in Vue.js environment

```console
npm install firemaker --save
```

## To use it in your application, you need to initialize your app with firebase.

```javascript

// Initializing Firebase
var config = {
    apiKey: "<API_KEY>",
    authDomain: "<PROJECT_ID>.firebaseapp.com",
    databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
    projectId: "<PROJECT_ID>",
    storageBucket: "<BUCKET>.appspot.com",
    messagingSenderId: "<SENDER_ID>",
  };
firebase.initializeApp(config);

// This ensures that your app is ready for Firemaker!
```

## Sign Up with email and password

```javascript
import Firemaker from 'firemaker'

Firemaker('local').signUp('email', 'password')
    .then(() => { // Promise based
        // Do what you need to here
    });

// Remember that your app needs to be initialized with your console config and activated in Firebase console
```

## Sign in with email and password

```javascript
import Firemaker from 'firemaker'

Firemaker('local').signIn('email', 'password')
    .then(() => {
        // Do what you need to here
    })
```

## Sign in with an email link
> This requires you to pass you actionCodeSettings as a third parameter, and also you can leave the second parameter as _

```javascript
import Firemaker from 'firemaker'
const actionCodeSettings = {
        url: 'http://localhost:8080',
        handleCodeInApp: true
    };

// The first parameter is the email to send the link to.
Firemaker('emailLink').signUp('example@mail.com', _, actionCodeSettings);
```
## Get the currently logged in user, if available

```javascript
import Firemaker from 'firemaker'

    // Important to specify your strategy
    Firemaker('local').getUser()
        // Optios can be added in the returned user eg. 1)
        // Returns full user object from Firebase
        .then((user) => console.log(user));
        // Eg 2)
        // Returns user with display name
        .then((user) => console.log(user.displayName));
        // Eg 3)
        // returns the unique id of the user
        .then((user) => console.log(user.uid));
        // Eg 4)
        // Returns the logged in user's email
        .then((user) => console.log(user.email));

// There are other properties available on the object
// Available on Firebase
```
# Enjoy, this package may grow over time to include more methods and options.

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