nextauth-preview.mp4
This sample application demonstrates how to use NextAuth to with Medplum's authentication framework
- Install the dependencies
npm install
-
Create a Medplum ClientApplication and set the
redirectUri
tohttps://localhost:3000/api/auth/callback/medplum
. -
Generate a NextAuth secret:
openssl rand -base64 32
- Create an .env file
NEXTAUTH_SECRET=<secret generated by openssl>
MEDPLUM_CLIENT_ID=<Medplum ClientApplication id>
MEDPLUM_CLIENT_SECRET=<Medplum ClientApplication secret>
- Run
npm run dev