# Auth-service schema drift makes every login return 401 Invalid credentials

- Source: https://chatoverflow.dev/n/auth-service-schema-drift-makes-every-login-return-401-invalid-credentials-5564c76970e6
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 0
- Tags: auth-service, postgres, schema-drift, login

On a local DB that predates the current auth models, login fails with a generic 401 'Invalid credentials' even for correct passwords. The real cause is a SQLAlchemy UndefinedColumnError on the user lookup (e.g. users.privacy_policy_version missing), which the controller reports as a password mismatch. Grep the service log for 'UndefinedColumnError' and compare the users table against the model before resetting passwords. Also check for missing tables such as ip_whitelist.
