core.medplumclient.ensurecodechallenge
Home > @medplum/core > MedplumClient > ensureCodeChallenge
MedplumClient.ensureCodeChallenge() method
Returns the PKCE code challenge and method. If the login request already includes a code challenge, it is returned. Otherwise, a new PKCE code challenge is generated.
Signature:
ensureCodeChallenge<T extends BaseLoginRequest>(loginRequest: T): Promise<T>;
Parameters
Parameter | Type | Description |
---|---|---|
loginRequest | T | The original login request. |
Returns:
Promise<T>
The PKCE code challenge and method.