pwa-module icon indicating copy to clipboard operation
pwa-module copied to clipboard

BUG returning from nuxt/auth login flow causing ?standalone=true to appear

Open Soviut opened this issue 3 years ago • 5 comments

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

Soviut avatar Mar 16 '21 00:03 Soviut

same here

CavalcanteLeo avatar Apr 12 '21 05:04 CavalcanteLeo

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.

filipsobol avatar Jul 01 '21 12:07 filipsobol

I have the same problem with nuxt-auth. Downgrading as a helped as a workaround.

mattcrn avatar Jul 09 '21 13:07 mattcrn

Experiencing this issue with @nuxtjs/pwa 3.3.5 as well

hyrumwhite avatar Oct 12 '21 13:10 hyrumwhite

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.

Tragio avatar Jun 29 '22 08:06 Tragio