Your idp.global instance is now running on port 2999. Configure your reverse proxy
(nginx, traefik, etc.) to handle HTTPS and route traffic to the container.
{/* Integrate with your app */}
Integrate with Your Application
Once you have access to an idp.global instance, install the TypeScript client:
{`npm install @idp.global/idpclient`}
Basic Usage
{`import { IdpClient } from '@idp.global/idpclient';
// Initialize the client
const idpClient = new IdpClient('https://idp.global');
// Enable WebSocket connection for real-time updates
await idpClient.enableTypedSocket();
// Check if user is logged in
const isLoggedIn = await idpClient.determineLoginStatus();
if (isLoggedIn) {
// Get current user info
const userInfo = await idpClient.whoIs();
console.log('User:', userInfo.user);
// Get user's organizations
const orgs = await idpClient.getRolesAndOrganizations();
console.log('Organizations:', orgs.organizations);
}`}