core.medplumclient.startjwtbearerlogin
Home > @medplum/core > MedplumClient > startJwtBearerLogin
MedplumClient.startJwtBearerLogin() method
Starts a new OAuth2 JWT bearer flow.
Signature:
startJwtBearerLogin(clientId: string, assertion: string, scope: string): Promise<ProfileResource>;
Parameters
Parameter | Type | Description |
---|---|---|
clientId | string | The client ID. |
assertion | string | The JWT assertion. |
scope | string | The OAuth scope. |
Returns:
Promise<ProfileResource>
Promise that resolves to the client profile.
Example
await medplum.startJwtBearerLogin(import.meta.env.MEDPLUM_CLIENT_ID, import.meta.env.MEDPLUM_JWT_BEARER_ASSERTION, 'openid profile');
// Example Search
await medplum.searchResources('Patient')
See: https://datatracker.ietf.org/doc/html/rfc7523\#section-2.1