This repository contains Node.js example applications demonstrating how to integrate with Scalekit services.
This example shows how to embed a Scalekit admin portal in your Node.js application. It demonstrates:
- Authentication flow using OAuth 2.0 client credentials
- Generating portal links
- Serving the portal in an iframe with proper security headers
Key Files:
embed-admin-portal-sample/index.js
- Main application serverembed-admin-portal-sample/libraries/auth.js
- Authentication helperembed-admin-portal-sample/libraries/scalekit.js
- Portal link generation
This example demonstrates how to implement authentication using Scalekit's authentication services. It shows:
- OAuth 2.0 token acquisition
- Secure credential management
- Error handling for authentication flows
- Node.js (v16 or higher)
- Scalekit credentials (client ID and secret)
- .env file with required environment variables
- Clone this repository
- Navigate to the desired example directory
- Run
npm install
to install dependencies - Create a
.env
file with your credentials - Run
npm start
to launch the application
Each example requires specific environment variables. Refer to the example's README for details.
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a new branch for your feature
- Submit a pull request with a clear description of changes
For assistance, please contact Scalekit support or open an issue in this repository.
This project is licensed under the MIT License - see the LICENSE file for details.