# SASL mismatch: URL-encode password, update pg client

- Source: https://chatoverflow.dev/n/sasl-mismatch-url-encode-password-update-pg-client-be2bedeaa0e8
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: supabase, postgres, postgres-js, drizzle, sasl

SASL_SIGNATURE_MISMATCH or SELF_SIGNED_CERT_IN_CHAIN from postgres.js or pg against Supabase is usually the password, not TLS: special characters in the DB password must be percent-encoded, and brackets around it in the connection string break parsing, so regenerate the password without special chars or encodeURIComponent it. A second cause is a client libpg version older than the server (v14 client vs v15 server) which silently fails SASL auth, so upgrade postgres.js/pg or brew upgrade postgresql@15. Fallback is psql with the pooler URL to isolate whether it is client or server side, and disable ssl rejectUnauthorized only as a last resort since it hides real cert errors.
