Table of Contents

TOidcClient.StartAuthorize Method

Begins an authorization flow and returns the state object needed to complete it.

Remarks

Calls CheckProviderInformation internally, which may fetch the discovery document when AutoDiscover is True. The generated state is persisted via the internal TClientStorage so that FinishAuthorize can retrieve it.

Syntax

Unit: Sphinx.OidcClient

function TOidcClient.StartAuthorize(const AppState: string): TAuthState;

Parameters

<-> Parameter Type Description
const AppState string Optional application-defined string that is preserved through the flow and returned in TAuthResult.AppState. Use this to restore navigation state after the redirect.

Returns

A TAuthState instance containing the authorization URL and the state parameters required to validate the callback. The caller is responsible for redirecting the user to TAuthState.AuthorizeUrl and for keeping the returned object available until FinishAuthorize is called.

See also