Our internal key of possible challenges from
Cognito. ForgotPassword
and Default
are
constants we made up to control the client-side
interface -- the former means we've begun a
PassReset
flow, the latter means there is
no challenge at all. NewPasswordRequired
and
MFA-related challenges, however, are proper
Cognito challenges. You can view the whole
list of them at:
General response shape for all Challenges. They
will always have a ChallengeName
, and the
Session
key is a special value which must be
passed back and forth throughout the Challenge-Response
flow.
Type guard; only returns true
if maybe
fully
satisfies Challenges.Data
. Validates that the
name is a valid value from Challenges.Types
,
that the session is a string, and that
Data.ChallengeParameters
has only string keys &
string values.
Type guard; only valid values for the
MfaTypes type will return true
.
Type guard; only valid enum values within the
Types enum will return true
.
Factory function to produce an empty ChallengeData
object. Session
is an empty string, the name is
Types.Default
, and ChallengeParameters
is an
empty object.
Generated using TypeDoc
When a user logs in with their username & password, they may have to respond to a challenge in order to finish the auth loop. This is a collection of data types and helper functions related those ChallengeResponse interactions.