Troubleshooting

Login redirects to signed-out

Check:
  • APP_URL matches the browser origin;
  • Keycloak redirect URI is exact;
  • KEYCLOAK_ISSUER is the public HTTPS issuer;
  • proxy sends X-Forwarded-Proto: https.

Admin API 401/403

Check the service account:
  • client ID/secret;
  • kc-admin-api client scope on Keycloak 26.8+;
  • realm-management roles;
  • the identity-provider roles for social settings.

CSRF check failed

  • Use the form from the current page.
  • Refresh after a restart.
  • Use the same host; do not switch between localhost and id.example.com.
  • Do not POST the API URL directly.

SMTP not working

  • Port 587: SMTP_STARTTLS=true.
  • Port 465: SMTP_SSL=true.
  • Check SPF/DKIM/DMARC.
  • Check Mailpit only in development.

Invite created but no e-mail

The user exists but execute-actions-email failed. Check Keycloak SMTP settings and the container logs.

MFA reset

An admin uses Reset MFA. If the only owner is locked out, use the break-glass Keycloak admin and remove the OTP credential; do not disable MFA for all admins.