0.0.16 • Published 5 years ago

pwa-auth v0.0.16

Weekly downloads
29
License
BSD-3-Clause
Repository
github
Last release
5 years ago

Application Authentication

workflow Demo

To provide a personalized experience, Apps need to know the identity of a user to securely store data in the cloud. pwa-auth is powered by The Firebase Authentication backend, consistently providing a centralized and predictable state behaviour with Redux, and declaratively render the DOM with Google Polymer's fast and light Lit-Element. This Component includes 3 HTML Tags, and 1 Boilerplate Function to display the user icon, sign up, login, log out, change account details, and delete the user's account.

Subscribe

PWA-AUTH includes Firebase's Cloud Firestore, Cloud Storage, and User Management that require Firebase setup to use this component.

<user-icon><user-drawer><user-settings>
1 photoDrop-downProfile
fetch social login photoOne click Google LoginEmail
Upload / Change Profile PhotoEmail Addresses and PasswordsPassword
logged in PhotoEmail Login
logged out Photo
unavailable Photo

Pollyfills

<script src="./node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js" async ></script>

Google & Firebase setup

  • Add Google Analytics
  • Setup Firebase Project
  • Initialize Firebase Authentication - email, anonymous, google
  • Initialize Firestore Database
<!-- FIREBASE -->
<script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/5.9.0/firebase-storage.js"></script> 
// Initialize Firebase
const admin = {
    apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    authDomain: "xxxxxxx.firebaseapp.com",
    databaseURL: "https://xxxxxxx.firebaseio.com",
    projectId: "xxxxxxx",
    storageBucket: "xxxxxxx.appspot.com",
    messagingSenderId: "xxxxxxxxxxx"
};
// REFERENCE TO SERVICES - Global
const application           = firebase.initializeApp(admin);
const firestore             = application.firestore();
const storage               = firebase.storage();
const storageRef            = storage.ref();

Website Setup:

import 'pwa-auth';
import { runFirebase } from 'pwa-auth/src/user-functions';
constructor() { runFirebase(); }
<header>
    <user-icon></user-icon>
</header>

<user-drawer></user-drawer>

<main>
    <user-settings></user-settings>
</main>

Properties (in Development)

PropertyDescriptionDefault
--drawer-position:Static or Still during scrolling fixed / absolutefixed
--drawer-background-color:change background#fff
--drawer-border:border thinckness3px

Command Line Interface Tools

  • polymer-cli
  • firebase-tools

Please send Feedback

All feedback, comments, bugs, and requests are welcome.

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago