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