pwa-module
pwa-module copied to clipboard
BUG returning from nuxt/auth login flow causing ?standalone=true to appear
We are using nuxt/auth to sign in with Auth0. Sometimes, when redirecting back from Auth0 to our /callback
URL, they get redirected to their /
home URL. At which point the ?standalone=true
gets mysteriously added to the querystring.
The home page appeared to be logged out, however, their cookies were all set correctly. Clicking the login button did nothing (it kept sending them to the page they were already on) and it would only show you were logged in when you clicked on the logo (the one visible nav item) which sent you to /
without standalone=true
on it.
It turns out that with /?standalone=true
it was being cached by workbox and that's what was showing to the user.
I still do not understand why standalone=true
even appears in the URL. We have some routing middleware to handle onboarding cases but the rest is being handled by nuxt/auth.
Our solution, for now, has to been to disable nuxt/pwa since it isn't critical for our app to work. However, I'm interested in getting to the bottom of this behaviour.
This Stack Overflow question seems somewhat related https://stackoverflow.com/questions/64608408/workbox-is-precaching-urls-without-revision-info-standalone-true-this-is-gene
same here
I encountered the same issue with our custom Auth0 integration. It seems to be caused by https://github.com/nuxt-community/pwa-module/issues/406.
As a workaround (mentioned in https://github.com/nuxt-community/pwa-module/issues/451#issuecomment-824019043), you can downgrade @nuxtjs/pwa
to version 3.2.0
since pre-caching was introduced in 3.2.1
.
I have the same problem with nuxt-auth. Downgrading as a helped as a workaround.
Experiencing this issue with @nuxtjs/pwa 3.3.5 as well
Having the same issue with the latest PWA and Auth modules. Since I'm using a custom manifest I fixed it by removing 'start_url'
line.