PRACTITIONER_LOGIN_ENABLED
Pause or resume practitioner sign-in for a project, and what the switch does and does not cover.
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
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
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
| 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
| 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
- The refusal arrives late in the two-step flow.
login/startandlogin/mfastill 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 atlogin/token. Build your sign-in screen to handle a403at 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 withDELETE /v1/auth/session/:idorPOST /v1/auth/logout. GETshowsfalsefor a project that has never set it, but practitioners can sign in. Set the key to the value you intend. See Unset settings.- Registration and invitations are separate. A practitioner who registers through
POST /v1/auth/tenant/Practitioner/registerreceives 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
403as when the switch is off. - Rate limits.
login/tokenallows 30 requests per minute per client address,login/mfa5, andlogin/start10.
Related
- Practitioner sign-in, the flow this switch controls
- PATIENT_LOGIN_ENABLED
- PRACTITIONER_REGISTRATION_ENABLED
- PRACTITIONER_INVITATION_ENABLED
Last updated on