New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

firemaker

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firemaker

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

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-42.86%
Maintainers
1
Weekly downloads
 
Created
Source

Firemaker

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
    })

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('example@mail.com', _, 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.

Keywords

FAQs

Package last updated on 17 Jul 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc