OAuth 2.1 Integration
Secure user-authorized access to RoleDream using OAuth 2.1 with PKCE
What is OAuth?
OAuth 2.1 is the industry-standard protocol for authorization. It enables third-party applications to access RoleDream on behalf of users without requiring their passwords. This is primarily used by MCP (Model Context Protocol) clients and other AI tools to securely access your data.
check_circle When to Use OAuth
- MCP/AI tool integrations
- Building user-facing applications
- Third-party integrations
- Applications that need user consent
When to Use API Keys
- Server-to-server integrations
- Automated scripts
- Internal tooling
- When no user interaction is needed
Authorization Flow
RoleDream uses the Authorization Code flow with PKCE (Proof Key for Code Exchange) for enhanced security.
OAuth Endpoints
/oauth/authorize/oauth/token/oauth/revoke/oauth/introspect/oauth/registerDiscovery Endpoints
These well-known endpoints provide server metadata for automatic client configuration.
/.well-known/oauth-authorization-serverOAuth 2.0 server configuration (RFC 8414)
/.well-known/oauth-protected-resourceResource server configuration (RFC 9728)
Available Scopes
Request only the scopes your application needs. Users will see these permissions during the consent flow.
read:customersRead customer data and profiles
write:customersCreate and update customer records
read:jobsRead jobs, solutions, and solution steps
write:jobsCreate and modify job data
read:interviewsAccess interview records
mcpMCP server access for AI integrations
Security Considerations
- Always use HTTPS for all OAuth endpoints
- Store tokens securely and never expose them in URLs
- Use short-lived access tokens and refresh tokens for long-term access
- Implement token revocation when users log out or revoke access
- Validate redirect URIs to prevent authorization code interception