This project is a Node.js + Express backend service that provides a JWT token generation API for SSO (Single Sign-On) integration with the Omnichannel Live Chat Widget.
├── app.js # Main application entry point
├── routes/
│ ├── privatekey.js # Route for generating JWT
│ └── publickey.js # Route for public key
├── views/
│ └── chatwidget.html # Frontend page
├── keys/
│ └── private.key # JWT signing private key (PEM format)
├── package.json
└── README.md
-
Install dependencies
npm install
-
Prepare the private key
- Place your
private.key(PEM format) in thekeys/directory.
- Place your
-
Start the server
node app.js
The server listens on port 900 by default.
-
Access the frontend Open your browser and go to http://localhost:900
-
Get a JWT token Visit http://localhost:900/privatekey to get a JWT.
- Do not commit
keys/private.keyornode_modules/to your Git repository. - To modify the JWT payload, edit
routes/privatekey.js.
- express
- jsonwebtoken
- fs
MIT