Add bcrypt user file auth, JWT middleware on all write routes, Pinia
authStore with localStorage persistence, login view with redirect
support, and v-if guards on all CRUD controls and admin nav link.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
julia
merged commit d35da524e9 into feature/07-improve-fruit-overview2026-06-19 10:04:12 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
backend/internal/authpackage: bcrypt verify (username:password pepper), JWT generate/validate (HS256, 1h expiry)POST /api/v1/auth/loginendpoint reads user map fromUSERS_FILEenvauthStorepersists JWT in localStorage;bearerHeader()/handleUnauthorized()shared by all API modulesLoginViewwith redirect-after-login support; router guard on/fruits/new,/publications/new,/adminv-if="auth.isLoggedIn"guards on all CRUD buttons and admin nav linkscripts/create_user.shgenerates bcrypt hash entries forusers.envTest plan
make testpasses (Go auth/middleware/handler tests + Vitest authStore tests)🤖 Generated with Claude Code