> ## Documentation Index
> Fetch the complete documentation index at: https://docs.medera.info/llms.txt
> Use this file to discover all available pages before exploring further.

# Session login

> Authenticate as an end user

End-user authentication uses your tenant's managed identity provider. The frontend uses `@clerk/clerk-react` to sign the user in and obtains a session JWT on demand.

````javascript theme={"system"}
import { useAuth } from '@clerk/clerk-react';
const { getToken } = useAuth;
const jwt = await getToken;

``` Send the JWT to backend endpoints as `Authorization: Bearer <jwt>`. The backend validates via `tenantAuth` middleware and writes a `phi_audit_logs` entry for every PHI-touching request.

## Backend webhooks The backend receives identity lifecycle webhooks at:

```text

POST /api/identity-webhooks

``` Validated via HMAC signature verification.
````
