feat(auth): install all authentication providers by default
lint / docker (push) Waiting to run

All authentication methods (Basic Auth, Flask-Login, OAuth) are now
installed as core dependencies instead of optional extras. This
simplifies setup and eliminates the need to run `uv sync --extra auth-*`
when switching between authentication methods.

Changes:
- Move authlib, bcrypt, and flask-login to core dependencies
- Remove auth-* optional dependency groups from pyproject.toml
- Update documentation to remove installation instructions
- Simplify troubleshooting and migration guides

Benefits:
- No import errors when switching auth methods
- Simpler user experience
- All providers available out of the box

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-05 21:17:30 +02:00
co-authored by Claude
parent 12f35934a9
commit 38a0d788d4
4 changed files with 18 additions and 89 deletions
+8 -41
View File
@@ -23,23 +23,7 @@ password = $2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYWv.5qVQK6
use_bcrypt = True
```
### 2. Install Dependencies
```bash
# For Basic Auth
uv sync --extra auth-basic
# For Flask-Login
uv sync --extra auth-login
# For OAuth
uv sync --extra auth-oauth
# For all auth methods
uv sync --extra auth-all
```
### 3. Restart TISBackup
### 2. Restart TISBackup
```bash
docker compose restart tisbackup_gui
@@ -332,12 +316,7 @@ docker logs tisbackup_gui | grep -i "auth"
### Basic Auth Not Working
1. **Check bcrypt installation:**
```bash
uv sync --extra auth-basic
```
2. **Verify password hash:**
1. **Verify password hash:**
```bash
python3 -c "import bcrypt; print(bcrypt.checkpw(b'yourpassword', b'$2b$12$your-hash'))"
```
@@ -354,12 +333,7 @@ docker logs tisbackup_gui | grep -i "auth"
chmod 600 /etc/tis/users.txt
```
2. **Module not found:**
```bash
uv sync --extra auth-login
```
3. **Session problems:**
2. **Session problems:**
- Check `TISBACKUP_SECRET_KEY` is set
- Ensure cookies are enabled
@@ -373,12 +347,7 @@ docker logs tisbackup_gui | grep -i "auth"
- Verify email matches `authorized_users` or domain matches `authorized_domains`
- Check OAuth provider returns email in user info
3. **Module not found:**
```bash
uv sync --extra auth-oauth
```
4. **Token errors:**
3. **Token errors:**
- Verify client ID and secret are correct
- Check OAuth app is enabled
- Ensure scopes are correct
@@ -415,17 +384,15 @@ Or implement API key authentication separately for API endpoints.
### From No Auth to Basic Auth
1. Add authentication section to config
2. Install bcrypt: `uv sync --extra auth-basic`
3. Restart service
4. Update client scripts with credentials
2. Restart service
3. Update client scripts with credentials
### From Basic Auth to OAuth
1. Register OAuth application
2. Update configuration
3. Install dependencies: `uv sync --extra auth-oauth`
4. Test OAuth login flow
5. Update redirect URI if needed
3. Test OAuth login flow
4. Update redirect URI if needed
### From Flask-Login to OAuth