mardi 20 août 2019

Is there a way to keep signed in status after redirecting to another page?

I am working on a project that includes multiple pages(index and packages). I am logging in on the index page using fire base and i have an element that redirects me to another page(Packages) It all works fine but when i get redirected i lose my login state.

I have the on Authentication state changed implemented in my JavaScript file and the two pages linked to it

I want the message to be kept when i move to the packages html page but it doesn't work Any help would be much appreciated !

firebase.auth().onAuthStateChanged(function(user) {
          if (user) {
             // Add welcome msg
                }




Aucun commentaire:

Enregistrer un commentaire