Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(next-auth): allow users to use the application offline #115

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/honest-dots-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ducanh2912/next-pwa": patch
---

fix(next-auth): allow users to use the application offline
2 changes: 1 addition & 1 deletion packages/next-pwa/src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down