Giter Club home page Giter Club logo

login-fire's Introduction

Login-Fire

login-fire

Simple way to add authentication to your app using firebase.


Install

bower install login-fire --save

<login-fire>

Add email and password authentication as well as social provider authentication to your app. If you want to only add social authentication or only email authentication please use <social-login-fire> or <email-login-fire> instead until issue 27 is closed.

<link rel="import" href="/bower_components/login-fire/login-fire.html">
<firebase-app
  name="login"
  api-key="AIzaSyAhoCXxkY-ffNwA_7L7HIwBVpASYj1btNE"
  auth-domain="convoo-login-demo.firebaseapp.com"
  database-url="https://convoo-login-demo.firebaseio.com">
</firebase-app>
<login-fire email-password anonymous twitter github google facebook app-name="login" user="{{user}}" signed-in="{{signedIn}}"></login-fire>

<social-login-fire>

Add social provider authentication to your app with firebase.

<link rel="import" href="/bower_components/login-fire/social-login-fire.html">
<firebase-app
  name="social"
  api-key="AIzaSyAhoCXxkY-ffNwA_7L7HIwBVpASYj1btNE"
  auth-domain="convoo-login-demo.firebaseapp.com"
  database-url="https://convoo-login-demo.firebaseio.com">
</firebase-app>
<social-login-fire google facebook twitter github anonymous app-name="social" user="{{user}}" signed-in="{{signedIn}}"></social-login-fire>

<email-login-fire>

Add email authentication to your app with firebase.

<link rel="import" href="/bower_components/login-fire/email-login-fire.html">
<firebase-app
  name="email"
  api-key="AIzaSyAhoCXxkY-ffNwA_7L7HIwBVpASYj1btNE"
  auth-domain="convoo-login-demo.firebaseapp.com"
  database-url="https://convoo-login-demo.firebaseio.com">
</firebase-app>
<email-login-fire app-name="email" user="{{user}}" signed-in="{{signedIn}}"></email-login-fire>

Signing Out

To sign out, access the login-fire element and call its signOut function. Example:

<a on-tap="_signOut">Sign Out</a>
_signOut: function(e){
  this.$$('login-fire').signOut();
  // or
  // this.$$('social-login-fire').signOut();
  // or
  // this.$$('email-login-fire').signOut();
}

Debugging

To make it easier to debug, we've added the debug attribute. Simply add "debug" to the element to see more details about its variables' values. Example:

<email-login-fire debug app-name="email" user="{{user}}" signed-in="{{signedIn}}"></email-login-fire>

Note: login-fire is not associated with firebase. polymerfire components are used with login-fire.

Contributing

Install the Polymer-CLI

First, make sure you have the Polymer CLI installed. Then run polymer serve to serve your application locally.

Viewing Your Application

$ polymer serve

Building Your Application

$ polymer build

This will create a build/ folder with bundled/ and unbundled/ sub-folders containing a bundled (Vulcanized) and unbundled builds, both run through HTML, CSS, and JS optimizers.

You can serve the built versions by giving polymer serve a folder to serve from:

$ polymer serve build/bundled

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.

login-fire's People

Contributors

sbeleidy avatar bkawk avatar polinom avatar gitter-badger avatar

Watchers

Jeff Laughlin avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.