aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared/Login.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/Login.js b/shared/Login.js
index 6015ee5..5b6c7a1 100644
--- a/shared/Login.js
+++ b/shared/Login.js
@@ -24,4 +24,12 @@ $(document).ready(function(){
});
}
})
+ firebase.auth().onAuthStateChanged(function(user) {
+ if (user) {
+ window.location.replace('../dashboard')
+ }
+ else {
+ showAlert("Failed to sign in. Try again.")
+ }
+ });
}) \ No newline at end of file