Skip to main content

Errors reference

goauth returns JSON errors with a kind field (Auth.js-style).

Common kinds

KindWhen
ConfigurationInvalid setup, unknown provider
AccessDeniedSignIn callback returned false
VerificationBad token, passkey verify failed, OTP wrong
CredentialsSigninAuthorize failed
MFARequiredMFA challenge issued (informational)
MFAVerificationMFA step failed (invalid code, store/purge error)
AdapterErrorDatabase adapter failure
UnknownActionInvalid route

Example response

{
"message": "verify assertion",
"kind": "Verification"
}

Handling in clients

const res = await fetch("/auth/callback/passkey", { method: "POST", body });
if (!res.ok) {
const err = await res.json();
if (err.kind === "Verification") {
// show passkey retry UI
}
if (err.kind === "MFAVerification") {
// invalid MFA code or server error (e.g. adapter resend)
}
}

Use errors.Is with sentinel errors (ErrMissingAdapter, etc.) in Go middleware wrapping the handler.