Hi
I am building an Angular 2 app and using firebase as my authentication service. My app currently consists two pages, a login page and a settings page.
When the user successfully login I AM getting back the details on the authenticated user on all pages, However, when the user is in the settings page and refreshes the page the firebase instance becomes null and the only way to initialize it is by re authenticating.
To over comes this I tried to use the localstorage however I dont think it is wise to keep the user credentials there so another approach I thought of using is by getting a token upon login however when I am using the "createcustomToken" method I get an error " WEBPACK_IMPORTED_MODULE_4_firebase_app__.auth(...).createCustomToken is not a function"
so my questions is how can I overcome this and make sure that the user is indeed authenticated.
Thanks,