< Back

End a Session

When a person finishes using the Patient Chart, you must end the session and remove all access credentials. Health Gorilla does not persist session state, so you are responsible for ensuring that the viewer is closed securely and tokens are cleared from your system.

To end a session and log out

  1. Redirect the browser to the logout endpoint: https://api.healthgorilla.com/logout?redirect_uri=https://your-app.com/logout-complete
  2. Clear all access and refresh tokens from your local session storage.
  3. Optionally, revoke the access token by sending a POST request to https://api.healthgorilla.com/oauth2/revoke.

Session expiration

If you do not explicitly end the session, it will expire automatically based on the access token duration. To continue viewing the chart after expiration, you must relaunch the viewer using a new SMART on FHIR session.