This project demonstrates a cloud-based application using Node.js, integrated with AWS Cognito for authentication and authorization. It showcases the implementation of OpenID Connect callback handling, user group-based data retrieval, and secure data presentation.
- OpenID Connect authentication with AWS Cognito.
- User group verification to display proprietary or public data.
- Modular architecture for maintainability and scalability.
- Enhanced security with Helmet, CSRF protection, and rate limiting.
- Node.js (Version X.X.X or higher recommended)
- AWS account and a configured Cognito User Pool
- MySQL database with the required schema
- Clone the repository to your local machine.
- Navigate to the project directory and install dependencies:
npm install
- Set up your .env file with the required environment variables:
- COGNITO_CLIENT_ID
- COGNITO_CLIENT_SECRET
- COGNITO_REDIRECT_URI
- COGNITO_TOKEN_URL
- Database credentials
To start the application:
npm start
- Access the public data endpoint at /.
- Trigger the OIDC flow by navigating to the Cognito Authorization Endpoint.
This project is licensed under the MIT License.