Skip to main content

DirectAuthenticationFlow

An authentication flow that implements the Okta Direct Authentication API.

This enables developers to build native sign-in workflows into their applications, while leveraging MFA to securely authenticate users, without the need to present a browser. Furthermore, this enables passwordless authentication scenarios by giving developers the power to choose which primary and secondary authentication factors to use when challenging a user for their credentials.

Implements

Index

Constructors

constructor

  • Default constructor that loads the default Okta.plist or Okta.json configuration.

    Not all languages or environments support the concept of a configuration file format.

    In these environments, this constructor can be omitted.


    Returns DirectAuthenticationFlow

Properties

readonlyclient

client: OAuth2Client

The OAuth2Client this authentication flow will use.

delegateCollection

The collection of delegates this flow notifies for key authentication events.

readonlyisAuthenticating

isAuthenticating: boolean

Indicates whether or not this flow is currently in the process of authenticating a user.

readonlysupportedGrantTypes

supportedGrantTypes: [GrantType]

The list of grant types the application supports.

Methods

add

  • Adds the given argument as a delegate.


    Parameters

    Returns void

remove

  • Removes the given argument from the collection of delegates.


    Parameters

    Returns void

reset

  • reset(): void
  • Resets the authentication session.


    Returns void

resume

  • Resumes authentication when an additional (secondary) factor is required to verify the user.

    This function should be used when a MFA required status response is received.


    Parameters

    • from: Status

      The previous status returned from the server.

    • withFactor: SecondaryFactor

      The secondary factor to use when authenticating the user.

    Returns Promise<Status>

start

  • Start user authentication, with the given username login hint and primary factor.


    Parameters

    • loginHint: String

      The login hint, or username, to authenticate.

    • withFactor: PrimaryFactor

      The primary factor to use when authenticating the user.

    • intent: Intent = Intent.signIn

      The intentino of the user's authentication operation. Default: signIn.

    Returns Promise<Status>