[GH-ISSUE #2209] Web app manifest and 401 status code (Unauthorized) #6595

Closed
opened 2026-04-20 17:11:33 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @rhclayto on GitHub (Feb 9, 2026).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/2209

Pre-submission checklist

  • I have searched for existing open or closed issue reports with the same problem.

Description

I ran into this issue (see below). It's an easy change but I don't know if there are security or other implications, & it cannot be user configurable because it must be changed before building the frontend, unless there is some other way of doing this. Is this something that Vikunja would like to do? If so I can do a PR.

From https://vite-pwa-org.netlify.app/guide/faq.html#web-app-manifest-and-401-status-code-unauthorized :

Browsers send requests for the web manifest without credentials] https://web.dev/articles/add-manifest#link-manifest), so if your site sits behind auth, the request will fail with a 401 Unauthorized error – even if the user is logged in.

To send the request with credentials, the needs a crossorigin="use-credentials" attribute, which you can enable via useCredentials in the plugin options:

useCredentials: true

Vikunja Version

v1.0.0

Browser and version

Firefox/Chrome/any browser

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

Originally created by @rhclayto on GitHub (Feb 9, 2026). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/2209 ### Pre-submission checklist - [x] I have searched for existing open or closed issue reports with the same problem. ### Description I ran into this issue (see below). It's an easy change but I don't know if there are security or other implications, & it cannot be user configurable because it must be changed before building the frontend, unless there is some other way of doing this. Is this something that Vikunja would like to do? If so I can do a PR. From https://vite-pwa-org.netlify.app/guide/faq.html#web-app-manifest-and-401-status-code-unauthorized : Browsers send requests for the web manifest without credentials] https://web.dev/articles/add-manifest#link-manifest), so if your site sits behind auth, the request will fail with a 401 Unauthorized error – even if the user is logged in. To send the request with credentials, the <link rel="manifest"> needs a crossorigin="use-credentials" attribute, which you can enable via useCredentials in the [plugin options](https://github.com/antfu/vite-plugin-pwa/blob/main/src/types.ts#L79): `useCredentials: true` ### Vikunja Version v1.0.0 ### Browser and version Firefox/Chrome/any browser ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
GiteaMirror added the waiting for reply label 2026-04-20 17:11:33 -05:00
Author
Owner

@kolaente commented on GitHub (Feb 9, 2026):

What exactly was the issue that you ran into?

<!-- gh-comment-id:3870391717 --> @kolaente commented on GitHub (Feb 9, 2026): What exactly was the issue that you ran into?
Author
Owner

@rhclayto commented on GitHub (Feb 9, 2026):

I have Vikunja behind Authelia, so all routes are protected by cookie auth. By default, the browser doesn't include credentials (here, cookies) with web manifest requests, so those equests are rejected, the browser doesn't get a manifest.json. Changing the Vite setting makes web manifests get sent with credentials, making PWAs work behind auth.

<!-- gh-comment-id:3873094022 --> @rhclayto commented on GitHub (Feb 9, 2026): I have Vikunja behind Authelia, so all routes are protected by cookie auth. By default, the browser doesn't include credentials (here, cookies) with web manifest requests, so those equests are rejected, the browser doesn't get a manifest.json. Changing the Vite setting makes web manifests get sent with credentials, making PWAs work behind auth.
Author
Owner

@kolaente commented on GitHub (Feb 9, 2026):

Gotcha. That makes more sense now.

Do you want to send a PR?

<!-- gh-comment-id:3874157765 --> @kolaente commented on GitHub (Feb 9, 2026): Gotcha. That makes more sense now. Do you want to send a PR?
Author
Owner

@rhclayto commented on GitHub (Feb 9, 2026):

🫡

<!-- gh-comment-id:3874457460 --> @rhclayto commented on GitHub (Feb 9, 2026): 🫡
Author
Owner

@rhclayto commented on GitHub (Feb 9, 2026):

https://github.com/go-vikunja/vikunja/pull/2218

<!-- gh-comment-id:3874523783 --> @rhclayto commented on GitHub (Feb 9, 2026): https://github.com/go-vikunja/vikunja/pull/2218
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#6595