function createAuthorizationCode
createAuthorizationCode(
userId: string,
): Promise<string>

Records user userId's consent to sign in to the client of request, and returns where to send them: the client's callback page with a code, which the client trades within a minute (exchangeCode). The grant lasts until they withdraw it, so the page asks no more.

Parameters

userId: string

Return Type

Promise<string>

Throws

APIException

400 when the request is malformed or its redirectUri isn't the client's own; otherwise as checkClient.

Usage

import { createAuthorizationCode } from "api/services/identity-provider-service.ts";