Files
alfred-mobile/AUTHENTIK_TOKEN_LIFETIME.md
jknapp 6d4ae2e5c3 Initial commit: Alfred Mobile - AI Assistant Android App
- OAuth authentication via Authentik
- WebSocket connection to OpenClaw gateway
- Configurable gateway URL with first-run setup
- User preferences sync across devices
- Multi-user support with custom assistant names
- ElevenLabs TTS integration (local + remote)
- FCM push notifications for alarms
- Voice input via Google Speech API
- No hardcoded secrets or internal IPs in tracked files
2026-02-09 11:12:51 -08:00

53 lines
1.5 KiB
Markdown

# Extending OAuth Token Lifetime in Authentik
## Problem
The Alfred mobile app logs you out after ~5 minutes because the OAuth access tokens expire.
## Solution
Increase the token expiration time in Authentik.
## Steps
1. **Open Authentik Admin** → https://auth.dnspegasus.net/if/admin/
2. **Navigate to Applications**
- Click "Applications" in the left sidebar
- Find "alfred-mobile"
- Click on it
3. **Edit the OAuth Provider**
- Click "Edit Provider" or go to the linked provider
- Look for **"Access token validity"** setting
- Current value: `minutes=5` (5 minutes)
4. **Increase Token Lifetime**
- Change to one of these values:
- `minutes=60` (1 hour)
- `minutes=240` (4 hours)
- `minutes=1440` (24 hours) **← Recommended for mobile**
- `days=7` (1 week)
- `days=30` (1 month)
5. **Save Changes**
- Click "Update" or "Save"
6. **Test the App**
- Log out of the Alfred app
- Log back in
- The session should now last much longer!
## Recommended Settings
For the **alfred-mobile** OAuth provider:
- **Access token validity**: `minutes=1440` (24 hours)
- **Refresh token validity**: `days=30` (30 days)
This way:
- You stay logged in for a full day
- The app can refresh the token for up to 30 days
- You only need to re-login once a month at most
## Note
The app currently doesn't implement token refresh, so it will log you out when the access token expires. Increasing the token lifetime is the simplest fix until we implement refresh token handling.