← All fixes
Supabase AuthApiError: Invalid login credentials (signInWithPassword)
#154Error
AuthApiError: Invalid login credentials
Why it happens, and why this works
Supabase returns this one message for every password sign-in failure, on purpose, so attackers can't tell which part was wrong. The usual real causes: wrong password, the user signed up with a magic link or OAuth and has no password, the app points at a different Supabase project than the one the user exists in, or the user was inserted straight into auth.users without a properly hashed password.
Fix
1. Check the app's SUPABASE_URL / anon key are for the project where the user exists (Authentication > Users in that project).
2. Look at the user's provider. If it's email via magic link or Google, there's no password: use that method, or send a password reset to set one.
3. Reset the password from the dashboard or with resetPasswordForEmail and try again.
4. Create test users with supabase.auth.admin.createUser({ email, password, email_confirm: true }) or the dashboard, never by INSERTing into auth.users.
(An unconfirmed email gives a different error, "Email not confirmed".)Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
#84TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
nodeVerifiedNo reports yet
ValueError: invalid literal for int() with base 10
#72ValueError: invalid literal for int() with base 10: '3.5'
pythonVerifiedNo reports yet
Supabase table readable by anyone with the anon key
#2Data in a Supabase table can be fetched from the browser with only the public anon key, no login.