type

AuthConfig

Policy for an auth-enabled collection.

Properties

PropertyTypeDescription
SessionDurationtime.DurationSession lifetime; zero defaults to 24 hours.
PasswordPasswordPolicyControls local password validation and hashing.
MaxLoginAttemptsintFailures before lockout; zero defaults to 5 and a negative value disables lockout.
LockDurationtime.DurationLockout duration; zero defaults to 10 minutes.
PasswordResetPasswordResetConfigEnables recovery when its Send callback is configured.
Verify*VerifyEmailConfigRequires verified email before local login when non-nil.
APIKeysboolAllows revocable session-independent bearer credentials.
AccessAuthAccessAuthorizes authentication operations outside CRUD.
HooksAuthHooksObserves or rejects authentication lifecycle phases.
Strategies[]AuthStrategyAdds application-owned request authentication in declaration order.

How it works

Local password auth is built in. Recovery/email flows require trusted Send callbacks. External strategies are compiled Go integrations, not dynamically loaded providers. Private hashes and tokens never enter content fields or hooks.

Full signature