This example sets up the boilerplate for an Azure AD Portal. You can see a live version here. The boilerplate includes the following features:
- Recoil state management
- SWR data fetching
- MSAL.js authentication
Deploy the example using Vercel:
Execute create-next-app
with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example https://github.com/cpendery/example-azure-portal
yarn create next-app --example https://github.com/cpendery/example-azure-portal
pnpm create next-app --example https://github.com/cpendery/example-azure-portal
Open http://localhost:3000 to view it in the browser. The page will reload if you make edits. You will also see AMP validation errors in the console.
Things you need to do after installing the boilerplate:
- Update your environment variables in
.env.local
with your app-specific data (NEXT_PUBLIC_CLIENT_ID
,NEXT_PUBLIC_REDIRECT_URI
).
For production builds, you need to run (the app will be build into the .next
folder):
$ yarn build
To start the application in production mode, run:
$ yarn start
Deploy it to the cloud with Vercel (Documentation).