## MedplumClient.startJwtBearerLogin() method

Starts a new OAuth2 JWT bearer flow.

**Signature:**

```typescript
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](/content/docs/sdk/core.profileresource) >

Promise that resolves to the client profile.

## Example

```typescript
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 [RFC 7523 Section 2.1](https://datatracker.ietf.org/doc/html/rfc7523#section-2.1) for full details.
