Interface: WaspAuthConfig
Configuration of Wasp's own auth: which methods are enabled, plus everything that only makes sense when Wasp itself runs the signup and login flows.
Extends
AuthHooks
Fields
methods
methods:
Required<Pick<LocalAuthMethods,"usernameAndPassword">> &Partial<Record<"email",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|never|Required<Pick<LocalAuthMethods,"usernameAndPassword">> &Partial<Record<"email",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"usernameAndPassword">> &Partial<Record<"email",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"usernameAndPassword">> &Partial<Record<"email",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"usernameAndPassword">> &Partial<Record<"email",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"usernameAndPassword">> &Partial<Record<"email",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"usernameAndPassword">> &Partial<Record<"email",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|never|Required<Pick<LocalAuthMethods,"email">> &Partial<Record<"usernameAndPassword",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"email">> &Partial<Record<"usernameAndPassword",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"email">> &Partial<Record<"usernameAndPassword",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"email">> &Partial<Record<"usernameAndPassword",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"email">> &Partial<Record<"usernameAndPassword",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"email">> &Partial<Record<"usernameAndPassword",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Required<Pick<LocalAuthMethods,"email">> &Partial<Record<"usernameAndPassword",never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|never|never|Partial<Record<keyofLocalAuthMethods,never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Partial<Record<keyofLocalAuthMethods,never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Partial<Record<keyofLocalAuthMethods,never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Partial<Record<keyofLocalAuthMethods,never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Partial<Record<keyofLocalAuthMethods,never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object|Partial<Record<keyofLocalAuthMethods,never>> &Omit<LocalAuthMethods, keyofLocalAuthMethods> &ExternalAuthMethods&object
Enabled authentication methods. At least one method must be enabled --
with none, nobody could ever sign in, which is better expressed by
choosing an external provider or dropping auth altogether.
onAfterEmailVerified?
optionalonAfterEmailVerified?:Reference<AnyFunction>
Called once, after the user verifies their email. Receives email and user.
Inherited from
AuthHooks.onAfterEmailVerified
onAuthSucceededRedirectTo?
optionalonAuthSucceededRedirectTo?:string
Route that Wasp redirects users to after a successful login or signup.
Only takes effect when using Wasp's built-in Auth UI.
See Auth UI.
Default
"/"
Hooks
onAfterLogin?
optionalonAfterLogin?:Reference<AnyFunction>
Called after a successful login. Receives providerId, user, and, for
social auth, oauth fields including tokens and the unique OAuth request
ID.
Inherited from
AuthHooks.onAfterLogin
onAfterSignup?
optionalonAfterSignup?:Reference<AnyFunction>
Called after the user is created. Receives providerId, the created
user, and, for social auth, oauth fields including tokens and the
unique OAuth request ID.
Inherited from
AuthHooks.onAfterSignup
onBeforeLogin?
optionalonBeforeLogin?:Reference<AnyFunction>
Called before the user is logged in. Receives providerId and user.
Throw from this hook to reject a login based on custom criteria.
Inherited from
AuthHooks.onBeforeLogin
onBeforeOAuthRedirect?
optionalonBeforeOAuthRedirect?:Reference<AnyFunction>
Called before redirecting the user to the OAuth provider. Receives the
generated url and oauth.uniqueRequestId. Return { url } to override
the redirect URL.
Inherited from
AuthHooks.onBeforeOAuthRedirect
onBeforeSignup?
optionalonBeforeSignup?:Reference<AnyFunction>
Called before the user is created. Receives providerId plus the common
hook input. Throw from this hook to reject a signup based on custom
criteria.
Inherited from
AuthHooks.onBeforeSignup