Closed GanchoDanailov closed 3 years ago
any update on this? Could you please confirm its known issue
Hey @GanchoDanailov
This is expected.
When you shift-reload, the reloaded page will not be controlled by a service worker. This is part of the service worker specification.
So you won't be able to have server side authentification when a user uses shift-reload -> because no service worker can get the auth credentials and send them to the server before pageload.
If you have onAuthStateChanged configured however, the user gets logged in right afterwards in such a case.
Like you can see here: https://nuxt-fire-demo.herokuapp.com/
Version
@nuxtjs/firebase: 7.5.0 @nuxtjs/pwa: 3.3.5 firebase: 8.6.1 nuxt: 2.15.3
Reproduction Link
https://codesandbox.io/s/test-758x2?file=/store/index.js:584-594 https://758x2.sse.codesandbox.io/
Steps to reproduce
login -> hard refresh the page (Chrome mac - Cmd Shift R) -> missing res.locals on server. (On soft refresh res.locals are ok)
What is Expected?
On hard refresh - Expecting res.locals on the server
What is actually happening?
missing res.locals on the server on hard refresh