diff --git a/.changeset/honest-dots-grow.md b/.changeset/honest-dots-grow.md new file mode 100644 index 00000000..061c21ea --- /dev/null +++ b/.changeset/honest-dots-grow.md @@ -0,0 +1,5 @@ +--- +"@ducanh2912/next-pwa": patch +--- + +fix(next-auth): allow users to use the application offline diff --git a/packages/next-pwa/src/cache.ts b/packages/next-pwa/src/cache.ts index a4af8a99..2c37ee6e 100644 --- a/packages/next-pwa/src/cache.ts +++ b/packages/next-pwa/src/cache.ts @@ -141,7 +141,7 @@ const defaultCache: RuntimeCaching[] = [ // Exclude /api/auth/callback/* to fix OAuth workflow in Safari without having an impact on other environments // The above route is the default for next-auth, you may need to change it if your OAuth workflow has a different callback route // Issue: https://github.com/shadowwalker/next-pwa/issues/131#issuecomment-821894809 - if (!sameOrigin || pathname.startsWith("/api/auth/")) { + if (!sameOrigin || pathname.startsWith("/api/auth/callback")) { return false; }