Skip to main content

Type Alias: AuthEvent

AuthEvent = { screen: AuthScreen["value"]; type: "screenViewed"; } | { action: AuthAction; nextStep?: string; type: "actionSucceeded"; } | { action: AuthAction; errorName: string; type: "actionFailed"; }

Defined in: react-auth-cognito/src/authEvents.ts:21

What onAuthEvent receives. It never carries the email, password or code the user typed, so a consumer can forward it to analytics as is.

Union Members​

Type Literal​

{ screen: AuthScreen["value"]; type: "screenViewed"; }


Type Literal​

{ action: AuthAction; nextStep?: string; type: "actionSucceeded"; }

action​

action: AuthAction

nextStep?​

optional nextStep?: string

Amplify's nextStep when the action returns one, e.g. CONFIRM_SIGN_UP.

type​

type: "actionSucceeded"


Type Literal​

{ action: AuthAction; errorName: string; type: "actionFailed"; }

action​

action: AuthAction

errorName​

errorName: string

The Cognito error name, e.g. NotAuthorizedException.

type​

type: "actionFailed"