Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 900 Bytes

README.md

File metadata and controls

37 lines (24 loc) · 900 Bytes

Medplum NextAuth Demo

nextauth-preview.mp4

This sample application demonstrates how to use NextAuth to with Medplum's authentication framework

Running the Demo

  1. Install the dependencies
npm install
  1. Create a Medplum ClientApplication and set the redirectUri to http:https://localhost:3000/api/auth/callback/medplum.

  2. Generate a NextAuth secret:

openssl rand -base64 32
  1. Create an .env file
NEXTAUTH_SECRET=<secret generated by openssl>
MEDPLUM_CLIENT_ID=<Medplum ClientApplication id>
MEDPLUM_CLIENT_SECRET=<Medplum ClientApplication secret>
  1. Run
npm run dev
nextauth-preview.mp4