Files
TimeTracker/docs
Dries Peeters 5c11010095 feat(oidc): add optional OIDC login via Authlib; config, routes, docs
- Add AUTH_METHOD switch (local | oidc | both); default remains local
- Update login UI to conditionally show SSO button and/or local form
- Add Authlib and initialize OAuth client (discovery-based) in app factory
- Implement OIDC Authorization Code flow with PKCE:
  - GET /login/oidc → starts auth flow, preserves `next`
  - GET /auth/oidc/callback → exchanges code, parses ID token, fetches userinfo
  - Maps claims to username/full_name/email; admin mapping via group/email
  - Logs user in and redirects to intended page
- Add optional OIDC end-session on logout (falls back gracefully if unsupported)
- Extend User model with `email`, `oidc_issuer`, `oidc_sub` and unique constraint
- Add Alembic migration 015 (adds columns, index, unique constraint)
- Update env.example with OIDC variables and AUTH_METHOD
- Add docs/OIDC_SETUP.md with provider-agnostic setup guide and examples
- fix: remove invalid walrus usage in OIDC client registration

Migration:
- Run database migrations (e.g., `flask db upgrade`) to apply revision 015

Config:
- AUTH_METHOD=local|oidc|both
- OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, OIDC_REDIRECT_URI
- OIDC_SCOPES (default: "openid profile email")
- OIDC_USERNAME_CLAIM, OIDC_FULL_NAME_CLAIM, OIDC_EMAIL_CLAIM, OIDC_GROUPS_CLAIM
- OIDC_ADMIN_GROUP (optional), OIDC_ADMIN_EMAILS (optional)
- OIDC_POST_LOGOUT_REDIRECT_URI (optional)

Routes:
- /login (respects AUTH_METHOD), /login/oidc, /auth/oidc/callback, /logout

Docs:
- See docs/OIDC_SETUP.md for full setup, provider notes, and troubleshooting
2025-10-05 11:46:20 +02:00
..
2025-09-05 15:00:08 +02:00

TimeTracker Documentation

Welcome to the TimeTracker documentation. This directory contains comprehensive documentation for all aspects of the application.

📚 Documentation Index

🚀 Getting Started

🐳 Docker & Deployment

🔧 Features

🛠️ Technical Details

📋 Project Guidelines

🔍 Quick Navigation

For New Users

  1. Start with the main README.md
  2. Check REQUIREMENTS.md for system requirements
  3. Review PROJECT_STRUCTURE.md for architecture overview

For Developers

  1. Read CONTRIBUTING.md for contribution guidelines
  2. Review feature-specific documentation for areas you're working on
  3. Check SOLUTION_GUIDE.md for common issues

For Deployment

  1. Review DOCKER_PUBLIC_SETUP.md for Docker deployment
  2. Check DOCKER_STARTUP_TROUBLESHOOTING.md if you encounter issues
  3. See SOLUTION_GUIDE.md for deployment solutions

📝 Documentation Structure

All documentation files are organized by category and purpose:

  • Feature Documentation: Explains specific application features
  • Technical Guides: Implementation details and technical information
  • Deployment Guides: Setup and deployment instructions
  • Troubleshooting: Common issues and their solutions
  • Project Guidelines: Community and contribution guidelines

🤝 Contributing to Documentation

If you find errors or want to improve the documentation:

  1. Check the CONTRIBUTING.md guidelines
  2. Make your changes
  3. Submit a pull request

Good documentation helps everyone use and contribute to the project effectively!