prerequisite: register your web application in AAD, edit its manifest and set "oauth2AllowImplicitFlow": true
. Note down the app's clientId, tenant and reply url.
- cd sample\server
- edit server.ts to make server listen at url and port that matches app's reply url and homepage
- tsc -p tsconfig.server.json (this should output server.js to <project-root>\dist\sample)
- cd sample\client
- edit sample.ts and update the clientId and tenant information in config
- [optional]: change
popUp: true
, if you would like a pop-up instead of main page being redirected for authentication. - webpack (this should output bundle.js to <project-root>\dist\sample)
- cd <project-root>\dist\sample
- node .\server.js to start server
- open browser, navigate to the URL where the server is listening (as configured in step 2)
- follow adal auth flow to complete authentication.