Introduction
This guide covers how to integrate your applications with Keycloak instances managed by Skycloak. While Skycloak handles the infrastructure and management of your Keycloak clusters, you’ll use standard Keycloak integration patterns to connect your applications.
Integration Methods
Section titled “Integration Methods”Standard Protocols
Section titled “Standard Protocols”- OpenID Connect (OIDC) - Recommended for most web and mobile applications
- SAML 2.0 - For enterprise applications requiring SAML support
- OAuth 2.0 - For API authorization
- WebAuthn - For passwordless authentication
Official Keycloak Adapters
Section titled “Official Keycloak Adapters”- Keycloak Node.js Adapter
- Keycloak Spring Boot Adapter
- Keycloak JavaScript Adapter
- Other official adapters
Alternative Approaches
Section titled “Alternative Approaches”- Generic OpenID Connect libraries
- Custom implementations using Keycloak REST APIs
- Third-party OAuth 2.0/OIDC libraries
Frameworks
Section titled “Frameworks”Server-Side
Section titled “Server-Side”- Node.js/Express
- Spring Boot
- Django
- Laravel
- .NET Core
Frontend
Section titled “Frontend”- React
- Angular
- Vue.js
- Next.js
- Plain JavaScript
Mobile
Section titled “Mobile”- Android (using AppAuth)
- iOS (using AppAuth)
- React Native
- Flutter
Common Patterns
Section titled “Common Patterns”Web Applications
Section titled “Web Applications”- Browser-based authentication
- Backend-for-frontend pattern
- Direct grant access
- Service accounts
API Security
Section titled “API Security”- Bearer token authentication
- Introspection endpoint
- User-managed access (UMA)
- Resource-based authorization
Enterprise Patterns
Section titled “Enterprise Patterns”- Single Sign-On (SSO)
- Identity brokering
- Token exchange
- Client-to-client communication
Best Practices
Section titled “Best Practices”Security
Section titled “Security”- Always use HTTPS
- Implement PKCE for public clients
- Secure token storage
- Regular security updates
- Proper scope usage
Performance
Section titled “Performance”- Token caching
- Minimizing token size
- Efficient role checking
- Proper session management
Development
Section titled “Development”- Use official adapters when available
- Implement proper error handling
- Follow OAuth 2.0 best practices
- Test with multiple token types
Getting Started
Section titled “Getting Started”- Get your Keycloak connection details from Skycloak dashboard
- Choose the appropriate adapter or library for your platform
- Configure your client in Keycloak
- Implement the authentication flow
- Test the integration