Skip to content

Instantly share code, notes, and snippets.

@denisemauldin
Last active August 29, 2015 14:24
Show Gist options
  • Save denisemauldin/a6abb58ad673c345a2c1 to your computer and use it in GitHub Desktop.
Save denisemauldin/a6abb58ad673c345a2c1 to your computer and use it in GitHub Desktop.
var userRef = new Firebase("https://shining-fire-453.firebaseio.com/users");
userRef.child(authData.uid).once("value",function(snapshot) {
console.log("snapshot in userREf",snapshot);
var fullName = snapshot.val().name;
console.log("fullname",fullName);
var displayName = fullName.split(' ');
localStorage.setItem("firstName", displayName[0]);
//redirect to user-enabled home page
console.log("welcome back, welcome back, welcoooome baack...");
}).done(window.location = "http://localhost:8000/index.html");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment