Skip to main content
function useCreateDelegation(): UseCreateDelegationReturnType;
Hook that provides a function to create a delegation allowing a developer to sign on behalf of an end user.

Returns

UseCreateDelegationReturnType An object containing the createDelegation function.

Example

const { createDelegation } = useCreateDelegation();
const result = await createDelegation({ expiresAt: '2025-12-31T23:59:59Z' });
console.log(result.delegationId);