create

fun create(issuerUrl: String, clientId: String, scope: List<String>, buildAction: DirectAuthenticationFlowBuilder.() -> Unit? = null): Result<DirectAuthenticationFlow>

Creates an instance of DirectAuthenticationFlow using the builder pattern.

Return

A Result containing the configured DirectAuthenticationFlow on success, or an exception on failure.

Parameters

issuerUrl

The base URL of the Authorization Server. This is the issuer URI for the authorization server that will be used for the flow. For example: https://dev-123456.okta.com.

clientId

The client ID of the application. This ID is obtained from the Okta developer console when you register your application.

scope

The OAuth 2.0 scopes the application is requesting. Scopes are used to specify what access privileges are being requested for access tokens. For example: openid, profile, email, and offline_access.

buildAction

A lambda with a DirectAuthenticationFlowBuilder receiver to configure the flow's parameters.