Skip to main content
function createDelegation(options: CreateDelegationOptions): Promise<CreateDelegationResult>;
Creates a delegation that allows a developer to sign on behalf of an end user for the specified duration. The end user must be authenticated to authorize this delegation.

Parameters

ParameterTypeDescription
optionsCreateDelegationOptionsOptions for creating the delegation.

Returns

Promise<CreateDelegationResult> The delegation ID.

Throws

If expiresAt is not a valid date or is not in the future.

Throws

Error if the user is not signed in.