Verify a SMART sign-in code
- Sandbox: available
- On your own host? Choose https://{host} in the playground.
Verifies the authenticator code of a SMART sign-in whose step is mfa, and answers the next step.
Behaviour
- A wrong code is 400. After 5 wrong codes the sign-in ends: start again.
application/json- body
session*stringThe sign-in handle the previous step answered.
32 <= length <= 64code*stringThe authenticator code.
^\d{6}$The next step.
application/json- response
next*stringWhat the page asks for next, or done.
"mfa""profile""patient""done"session*stringThe handle for the next step; null when done.
profiles*array<>The profiles to choose from, when next is profile.
redirect*stringWhere to send the browser when next is done: the app's redirect URI with code and state.
curl -X POST 'https://api.sandbox.ovok.com/v1/smart/sign-in/mfa' \ -H 'Content-Type: application/json' \ -d '{ "session": "stringstringstringstringstringst", "code": "string"}'{ "next": "mfa", "session": "string", "profiles": [ { "membership": "string", "resourceType": "string", "name": "string", "project": "string" } ], "redirect": "string"}Sign in for a SMART app POST
Signs a user in for a SMART app's standalone launch: one password, then Ovok answers the app itself. **Scope:** the app's project. The user must have a profile there: a Patient, a Practitioner or a RelatedPerson. ## Behaviour - The `authorize` parameters are checked as `POST /v1/smart/sign-in/request` checks them. - The answer is the next step, with a `session` handle for it: `mfa` (an authenticator code), `profile` (choose one of the user's profiles in the project), `patient` (pick a patient), or `done`. - A Patient gets their own record and goes straight to `done`; anyone else picks a patient they may read. - `done` carries `redirect`: the app's `redirect_uri` with `code` and `state`. The app exchanges the code at `https://api.sandbox.ovok.com/oauth2/token` with its PKCE verifier, and its token names the patient. - A project with login off refuses its users (403), except a practitioner who administers it. - A session lasts 10 minutes and answers the app once. ## Example ```bash curl -X POST 'https://api.sandbox.ovok.com/v1/smart/sign-in' -H 'Content-Type: application/json' \ -d '{"authorize":{"response_type":"code","client_id":"<client id>","redirect_uri":"https://app.example.com/callback","scope":"launch/patient openid fhirUser patient/*.rs","state":"af0ifjsldkj","code_challenge":"<S256 challenge>","code_challenge_method":"S256"},"email":"dr.weber@example.com","password":"<password>"}' ```
Choose the profile of a SMART sign-in POST
Chooses which of the user's profiles a SMART sign-in uses, when its step is `profile`, and answers the next step. ## Behaviour - `membership` must be one of the `profiles` the previous step listed. - A Patient profile goes to `done`; any other picks a patient next.