Skip to content

Instantly share code, notes, and snippets.

@iamtylerd
iamtylerd / auth.md
Last active August 4, 2016 16:42
Firebase Auth Rules

Rules

This is not a full proof way to validate but it will ensure that only a specific UID can. Make sure that you install via Bower angular-local-storage

  1. Link it in the HTML
  2. Add 'LocalStorageModule' to your App (dependency)
  3. Pass 'localStorageService' to any controllers that need to get the user
  4. set let currentUser = localStorageService.get("currentUser"); in the controller.
  • Local Storage is used to cache the user locally since Firebase does not keep them logged in on a refresh
// A Unit test template for Tape
// See 5 Questions every unit test must answer:
// https://medium.com/javascript-scene/what-every-unit-test-needs-f6cd34d9836d
import test from 'tape';
test('What are you testing?', assert => {
const msg = 'what should it do?'
const actual = 'what was the output?';