https://github.com/michalzagrodzki/node-azure-auth
Project showing how authentication with Azure Active Directory is done through node.js server
https://github.com/michalzagrodzki/node-azure-auth
azure azure-active-directory azuread-b2b express-session expressjs https-server microsoft-graph-client nodejs nodejs-api passport passport-azure-ad
Last synced: about 2 months ago
JSON representation
Project showing how authentication with Azure Active Directory is done through node.js server
- Host: GitHub
- URL: https://github.com/michalzagrodzki/node-azure-auth
- Owner: michalzagrodzki
- Created: 2020-04-21T13:59:54.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T02:46:01.000Z (over 3 years ago)
- Last Synced: 2025-03-11T05:16:49.220Z (about 1 year ago)
- Topics: azure, azure-active-directory, azuread-b2b, express-session, expressjs, https-server, microsoft-graph-client, nodejs, nodejs-api, passport, passport-azure-ad
- Language: JavaScript
- Homepage:
- Size: 707 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Server app for authenticating with Azure AD
This project aims for creating solution for server app, that can authenticate users.
Authenticating is done through Azure Active Directory
Authentication of users is done in following patterns:
- Active Directory is setup as B2B - collaboration between organizations. Users which are registered or invited from Active Directory level can login to app.
- Authentication is done on server level
- Client receives access token and refresh token
- Logged in users are stored in local memory session
This project uses [Vue-Azure-Auth-Client](https://github.com/michalzagrodzki/Vue-Azure-Auth-Client) project as client application.
## Project setup
```
npm install
```
### Create key and certificate for https
Key needs to be at least 1024 bits long. Otherwise it will throw error.
```
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem
```
### Development server
```
npm run serve
```