Authentication

In line with the SMART framework, authentication is typically an integral part of the OAuth 2.0 authorization process. For verifying end-user identity, an external identity provider is expected, typically using OpenID Connect (OIDC). While OIDC is the recommended approach, the exact mechanisms of identity verification are considered implementation-specific and fall outside the scope of this specification.

Supported Authentication Flows

Client Applications may authenticate with the Platform using one of the following OAuth2-compatible flows. The choice of flow depends on the client application type (public vs. confidential) and the desired security posture.

Platform implementation must clearly advertise which flows are supported in its .well-known/smart-configuration metadata document. This allows clients to dynamically determine how to authenticate and obtain tokens.

Client Authentication Methods

SMART distinguishes two main authentication methods for confidential clients:

Deprecated Flows

The following OAuth 2.0 flows are discouraged and MUST NOT be used within SMART on openEHR due to security concerns:

Flow Recommendations

The following recommendations apply based on client type and use case:

These flows ensure secure and appropriate access to the Platform based on the capabilities and deployment context of the application.

The table below illustrates recommended flows for common application scenarios:

Application Example Client Type User Interaction Type Recommended Flow

Single Page Web Application for a Patient Portal

Public

Patient-facing

Authorization Code Grant with PKCE

Mobile Application for Tracking Heart Rate

Public

Patient-facing

Authorization Code Grant with PKCE

Web Application with Backend for Cardiology Management

Confidential

Practitioner-facing

Authorization Code Grant with PKCE or Authorization Code Grant with client_secret

Realtime Alert System for Hospital

Confidential

Backend service

JWT Bearer Token Grant with JWS or Client Credentials Grant