Add user login, app header, and dynamic token auth#3
Open
florianholtgrefe wants to merge 4 commits into
Open
Conversation
- LoginView: form posts to POST /api/token/, fetches user from /api/ui_settings/, stores token + user in localStorage — no static env token needed - authStore: Svelte 5 runes store, reads/writes localStorage, exposes isLoggedIn - AppHeader: search bar (dummy), notifications icon, user avatar + name, dropdown menu with logout - Layout: gate entire app behind authStore.isLoggedIn, shows LoginView otherwise - api/client.ts: authHeader() reads token from localStorage dynamically Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Dockerfile: two-stage build (node:22 build + nginx:alpine serve) - nginx.conf: serves static build, proxies /api/ and /share/ to paperless-ngx on internal Docker network (http://paperless-ngx:8000) - CSP: script-src 'self' blocks XSS script injection; style-src allows unsafe-inline for Svelte's dynamic tag color styles; frame-src/img-src allow blob: for PDF viewer and thumbnails; frame-ancestors 'none' - Additional headers: X-Content-Type-Options, X-Frame-Options, Referrer-Policy - adapter-static: fallback: 'index.html' for SPA routing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/token/des paperless-Backends. Kein eigener Benutzerspeicher — es gelten die paperless-Accounts.localStoragegespeichert.authStore(Svelte 5 runes) steuert den Login-Zustand über Sessions hinweg.authHeader()inapi/client.tsliest den Token jetzt aus localStorage statt aus einer statischen Env-Variable — keinVITE_PAPERLESS_TOKENmehr nötig.Test plan
🤖 Generated with Claude Code