Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var user = firebase.auth().currentUser;
- if (user == null) {
- console.log("usuario nullo");
- window.open("index.html", "_self", true);
- } else { //Usuario Activo
- //Codigo
- firebase.auth().onAuthStateChanged(function(user) {
- if (user) {
- // El usuario está logueado, realiza acciones aquí
- } else {
- console.log("usuario nullo");
- location.replace("index.html");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement