jackc/pgx · error
require_auth method %q is specified more than once
Error message
require_auth method %q is specified more than once
What it means
Error "require_auth method %q is specified more than once" thrown in jackc/pgx.
Source
Thrown at pgconn/require_auth.go:128
m = authMethodMD5
case "gss":
m = authMethodGSS
case "sspi":
m = authMethodSSPI
case "scram-sha-256":
m = authMethodSCRAMSHA256
case "oauth":
m = authMethodOAuth
case "none":
m = authMethodNone
default:
return requireAuth{}, fmt.Errorf("invalid require_auth method: %q", method)
}
bit := uint8(1) << m
if negated {
if ra.allowed&bit == 0 {
return requireAuth{}, fmt.Errorf("require_auth method %q is specified more than once", part)
}
ra.allowed &^= bit
if m == authMethodNone {
ra.authRequired = true
}
} else {
if ra.allowed&bit != 0 {
return requireAuth{}, fmt.Errorf("require_auth method %q is specified more than once", part)
}
ra.allowed |= bit
if m == authMethodNone {
ra.authRequired = false
}
}
}
return ra, nil
}View on GitHub (pinned to ec1a0befd2)
When it happens
Trigger: Thrown at pgconn/require_auth.go:128 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jackc/pgx@ec1a0befd2 (2026-08-04).
Data as JSON: /data/errors/427c5776b8607558.json.
Report an issue: GitHub.