We have a NextJS website built for our clients, that requires you to be authenticated to access any page (this was accomplished using NextJS’s middleware). Now, we are running into a problem where we want to make our web app into a PWA using a service worker, but when the service worker goes to fetch the manifest.json on the server it is forced to try and authenticate which fails. The best solution would be to be able to share cookies with the service worker, but is there a workaround for this other than to disable authentication for that one specific file?
Related Topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Nextjs-auth0 for CSR | 4 | 3367 | October 29, 2020 | |
Next.js Practical Introduction: Pages and Layout | 11 | 5992 | March 7, 2022 | |
Authenticate User on multiple localhost Next.js apps (with different ports) | 0 | 2805 | April 9, 2022 | |
Nextjs-auth0 stops to work in production | 3 | 483 | March 21, 2024 | |
External Api with User permissions from NextJs Server | 1 | 148 | July 17, 2024 |