# PRACTITIONER_LOGIN_ENABLED

Canonical page: https://docs.ovok.com/settings-and-features/settings/practitioner-login-enabled

Controls whether practitioners can sign in to the project. Turn it off to pause clinician access, for example during a migration or an incident.

| | |
| --- | --- |
| Type | Boolean setting |
| Change with | `PUT /v1/project/settings/PRACTITIONER_LOGIN_ENABLED` |
| Who can change it | Project admin |
| When unset | Practitioner sign-in is **on**, although `GET /v1/project/settings` reports `false` |
| Set on new projects | `true` for child projects created with `POST /v1/slim/project/child`; not set by any other project-creation route |
| Inherited | No. A child project reads only its own value. |

## Turn practitioner sign-in off [#turn-practitioner-sign-in-off]

```bash
curl --request PUT \
  --url 'https://api.sandbox.ovok.com/v1/project/settings/PRACTITIONER_LOGIN_ENABLED' \
  --header "Authorization: Bearer ${OVOK_TOKEN}" \
  --header 'Content-Type: application/json' \
  --data '{"enabled":false}'
```

> **Project admins are not exempt.** If you turn practitioner sign-in off and your own session ends, you cannot sign back in to turn it on again. Keep a signed-in admin session open until you have confirmed the change.

## Which sign-in this applies to [#which-sign-in-this-applies-to]

Tenant sign-in (`/v1/auth/tenant/Practitioner/...`) is the current way to sign in to an Ovok project. Every project has a tenant code, which names the project in the request. The older routes in the table below still work and are listed because the switch covers them too: `POST /auth/login`, TAN sign-in, `/auth/external/*` and `/auth/signup` are marked deprecated, and `POST /v2/auth/login` is the older client-ID sign-in that the platform's own code says to replace with tenant sign-in.

## Where the switch applies [#where-the-switch-applies]

| Sign-in path | Checked today? |
| --- | --- |
| `POST /v1/auth/tenant/Practitioner/login/token` | Yes |
| `POST /v2/auth/login` and the deprecated `POST /auth/login` | Yes |
| `POST /v1/auth/tenant/Practitioner/login/start` and `login/mfa` | No |
| TAN sign-in | Yes |
| Token refresh (`POST /v1/auth/refresh-token`, `/oauth2/token`) | Yes, except for project admins |
| `POST /v1/auth/tenant/Practitioner/register` (returns tokens on success) | No |

Treat the table as the contract for your current release and test the paths your app uses.

## What callers see when it is off [#what-callers-see-when-it-is-off]

| Route | Status | Message |
| --- | --- | --- |
| `POST /v1/auth/tenant/Practitioner/login/token` | `403` | `Login is not enabled for this project.` |
| `POST /v2/auth/login` | `403` | `Login is not enabled for this project.` |
| `POST /v1/auth/refresh-token` | `403` | `Login is not enabled for this project.` |
| `POST /oauth2/token` (refresh grant) | `403` | `access_denied`, with `error_description` `Login is not enabled for this project.` |
| TAN sign-in | `400` | No message. |

On the tenant route the check runs before the session code is used, so a refused request does not consume the code. An unknown tenant code answers `404` first.

## Gotchas [#gotchas]

- **The refusal arrives late in the two-step flow.** `login/start` and `login/mfa` still verify the password and the second factor, and the response can list the project among the user's profiles. The user only learns that sign-in is off at `login/token`. Build your sign-in screen to handle a `403` at that step.
- **Turning it off ends sessions at the next refresh.** A signed-in practitioner keeps working until the access token expires, up to 60 minutes; the next token refresh is refused with `403`. Project admins can still refresh, so they can turn sign-in back on. To end a session at once, revoke it with `DELETE /v1/auth/session/:id` or `POST /v1/auth/logout`.
- **`GET` shows `false` for a project that has never set it, but practitioners can sign in.** Set the key to the value you intend. See [Unset settings](/settings-and-features#defaults-and-dependencies).
- **Registration and invitations are separate.** A practitioner who registers through `POST /v1/auth/tenant/Practitioner/register` receives tokens even when this switch is off.
- **A failed read looks like "off".** If the project cannot be read for a moment, callers see the same `403` as when the switch is off.
- **Rate limits.** `login/token` allows 30 requests per minute per client address, `login/mfa` 5, and `login/start` 10.

## Related [#related]

- [Practitioner sign-in](/authentication/practitioner-login), the flow this switch controls
- [PATIENT_LOGIN_ENABLED](/settings-and-features/settings/patient-login-enabled)
- [PRACTITIONER_REGISTRATION_ENABLED](/settings-and-features/settings/practitioner-registration-enabled)
- [PRACTITIONER_INVITATION_ENABLED](/settings-and-features/settings/practitioner-invitation-enabled)
