goauthentik / goauthentik/authentik
Accessing account MFA "Failed to fetch objects" - api/v3/authenticators/all/ - Datetime out of range
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 651
Description
**Describe the bug**
I went to the user settings to add an additional MFA device, and received the error `Failed to fetch objects`. After looking through the browser devtools, I noticed the URL `api/v3/authenticators/all/` returning a `400` error. Once I went to that URL, I get the error:
```
["Datetime value out of range."]
```
**To Reproduce**
Steps to reproduce the behavior:
1. Sign into authentik
2. Click `Settings` in top-right
3. Click `MFA Devices`
4. See error
**Expected behavior**
Should show currently registered devices
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Logs**
Output of docker-compose logs or kubectl logs respectively
```
INF | auth_via=session domain_url=auth.domain.lan event=/api/v3/authenticators/all/
host=auth.domain.lan logger=authentik.asgi method=GET pid=61
remote=XX.XX.XX.XX request_id=012a4efac536aef250c394caf146ea31 runtime=75 schema_name=public
scheme=https status=400 timestamp=2025-04-16T017:20:29 user=admin
user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
```
**Version and Deployment (please complete the following information):**
- authentik version: `2025.2.4`
- Deployment: `docker-compose`
**Additional context**
I went into the postgresl db and took a look at the mfa tables where TOTP / devices / static are stored, and I don't see any datetime values that are abnormal.
---
An added note, the only way I could correct this problem, was flat out wiping all the entries in the db tables:
- authentik_stages_authenticator_static_staticdevice
- authentik_stages_authenticator_static_statictoken
- authentik_stages_authenticator_totp_totpdevice
- authentik_stages_authenticator_webauthn_webauthndevice
After that, I was able to create a new static token. But it makes no sense. Because all the previous data in these tables looked good.
Contributor guide
Research direction
Start by reproducing the 400 response from api/v3/authenticators/all/ on authentik 2025.2.4 and inspect how it reads the MFA device tables. Check authentik_stages_authenticator_static_staticdevice, authentik_stages_authenticator_static_statictoken, authentik_stages_authenticator_totp_totpdevice, and authentik_stages_authenticator_webauthn_webauthndevice for the datetime value involved. Done means the MFA Devices page lists registered devices without a “Datetime value out of range” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, postgresql, python
- Domain
- api, authentication, backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100