npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

firemaker

v1.0.4

Published

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

Downloads

12

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

npm install firemaker --save

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


// 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

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

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 _

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('[email protected]', _, actionCodeSettings);

Get the currently logged in user, if available

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.