mirror of
https://github.com/community-scripts/ProxmoxVE-Local.git
synced 2026-03-31 06:23:54 -04:00
[PR #17] [CLOSED] feat: Add authentication system to secure the application #117
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/17
Author: @RXWatcher
Created: 10/3/2025
Status: ❌ Closed
Base:
development← Head:feat/authentication-system📝 Commits (4)
5823e54Add GitHub templates and configuration (#8)5582d28Update note from 'beat' to 'beta' in READMEbe65ceefeat: Add SSH key authentication support6c6f031feat: Add authentication system to secure the application📊 Changes
26 files changed (+1797 additions, -215 deletions)
View changed files
➕
.github/CODEOWNERS(+15 -0)➕
.github/ISSUE_TEMPLATE/bug_report.yml(+50 -0)➕
.github/ISSUE_TEMPLATE/feature_request.yml(+33 -0)➕
.github/pull_request_template.md(+24 -0)📝
README.md(+1 -1)➕
middleware.ts(+78 -0)📝
package-lock.json(+40 -0)📝
package.json(+4 -0)➕
src/app/_components/AuthProvider.tsx(+74 -0)➕
src/app/_components/LogoutButton.tsx(+56 -0)➕
src/app/_components/ProtectedRoute.tsx(+37 -0)📝
src/app/_components/ServerForm.tsx(+80 -4)➕
src/app/api/auth/login/route.ts(+76 -0)➕
src/app/api/auth/logout/route.ts(+29 -0)➕
src/app/api/auth/me/route.ts(+44 -0)➕
src/app/api/auth/setup/route.ts(+90 -0)📝
src/app/api/servers/[id]/route.ts(+19 -4)📝
src/app/api/servers/route.ts(+19 -4)📝
src/app/layout.tsx(+6 -1)➕
src/app/login/page.tsx(+134 -0)...and 6 more files
📄 Description
Summary
This PR adds a comprehensive authentication system to the PVE Scripts management interface, making it safe to expose the application to the internet.
Features
Technical Implementation
Database Schema
userstable for storing user credentialssessionstable for managing active sessionsAPI Endpoints
/api/auth/login- User authentication/api/auth/logout- Session termination/api/auth/me- Current user verification/api/auth/setup- Initial admin setupFrontend Components
AuthProvider- React context for global auth stateProtectedRoute- Component wrapper for secured pagesTesting
All authentication flows have been tested:
Security Considerations
Breaking Changes
None - the application will prompt for initial setup on first run.
Screenshots
The login page provides a clean interface for authentication, while the setup page guides users through creating their first admin account.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.