SupabaseS
Supabase2w ago

500: Database error granting user

When trying to log in as a user with email & password using supabasejs, the error 500: Database error granting user occurs.
When looking at the logs, the event message is
{
    "auth_event": "[REDACTED]",
    "component": "api",
    "error": "error creating refresh token: failed to close prepared statement: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02): ERROR: duplicate key value violates unique constraint \"refresh_tokens_pkey\" (SQLSTATE 23505)",
    "grant_type": "password",
    "level": "error",
    "method": "POST",
    "msg": "500: Database error granting user",
    "path": "/token",
    "referer": "http://localhost:3000",
    "remote_addr": "[REDACTED]",
    "request_id": "9ab4a43ac581daab-MUC",
    "time": "2025-12-09T12:52:46Z"
}

I haven't touched auth at all as far as I know, how I can fix this?
Was this page helpful?