Skip to content

Interface: AuthContext

Authentication context of an already-authenticated user, passed via ActionEventOptions.authContext in a drs.triggerActionEvent() call. We recommend using it only when the login happened outside the current flow. If the user authenticates within the flow, report the user via drs.reportActionResult() instead.

Properties

userId

• userId: string

Opaque identifier of the authenticated user in your system. Required — providing an auth context indicates that the user is already authenticated (e.g. they logged in through a flow outside this SDK before reaching this action).


loginTimestamp

• Optional loginTimestamp: number

Unix timestamp (ms) of when the login happened.


challengeType

• Optional challengeType: ChallengeType

The challenge type used for the authentication action (e.g. sms_otp, password, passkey).


failedAttempts

• Optional failedAttempts: number

The number of failed attempts for the authentication action.


authMethod

• Optional authMethod: AuthMethodType

The authentication method used for the authentication action (e.g. password, mobile_biometric, oidc).


loginOrigin

• Optional loginOrigin: string

The origin the user logged in from, such as the URL of the site or app where the login took place.