Client Libraries
The SmarterServices IAM system provides client libraries for various platforms and programming languages to simplify integration with your applications.Available Clients
Browser Client (JavaScript/TypeScript)
The browser client is designed for client-side applications and provides seamless integration with modern web frameworks.Repository
- GitHub: iam-client
- NPM:
@smarterservices/iam-client
Features
- ✅ Framework Agnostic: Works with any JavaScript framework
- ✅ TypeScript Support: Full TypeScript definitions included
- ✅ Caching: Built-in permission caching for performance
- ✅ React Integration: Dedicated React components and hooks
- ✅ Vue Integration: Vue.js directives and composables
- ✅ Angular Integration: Angular services and guards
Installation
Basic Usage
Configuration Options
Server Client (Node.js)
The server client is optimized for server-side applications and provides additional features for service-to-service authentication.Repository
- GitHub: iam
- NPM:
@smarterservices/iam-node
Features
- ✅ Service Authentication: Service-to-service authentication
- ✅ Middleware Support: Express.js, Koa, and other framework middleware
- ✅ Bulk Operations: Batch permission checks
- ✅ Policy Management: Create and manage policies programmatically
- ✅ Audit Logging: Built-in audit trail functionality
- ✅ High Performance: Optimized for server workloads
Installation
Basic Usage
Framework Integrations
React Integration
Installation
Provider Setup
Component Protection
Hooks
Vue.js Integration
Installation
Plugin Setup
Directive Usage
Composition API
Angular Integration
Installation
Module Setup
Service Usage
Guard Usage
Directive Usage
Server-Side Integrations
Express.js Middleware
Koa.js Middleware
FastAPI (Python)
Django (Python)
Spring Boot (Java)
Mobile Clients
iOS (Swift)
Installation
Usage
Android (Kotlin)
Installation
Usage
Configuration
Environment-Based Configuration
Dynamic Configuration
Best Practices
1. Token Management
2. Error Handling
3. Caching Strategy
4. Batch Operations
Troubleshooting
Common Issues
- Token Expiration: Implement automatic token refresh
- Network Timeouts: Configure appropriate timeout values
- Cache Inconsistency: Use appropriate cache TTL values
- Resource Format Errors: Validate SSRN format
- Permission Lag: Account for eventual consistency
