OAuth Authentication Integration
This guide demonstrates how to implement OAuth-based authentication with Circularo for third-party applications. OAuth integration allows users to authenticate using their existing identity provider accounts (such as Google, Microsoft, or other configured providers).Prerequisites
Before implementing OAuth authentication, please note:- Your callback URL must be whitelisted by Circularo support team
- This integration uses endpoints that may only be presented in full Circularo OpenAPI schema
- This flow is intended for specialized integration scenarios
Contact Circularo support to have your callback URL whitelisted before attempting to implement this authentication flow.
Step 1 - Initiate OAuth authentication flow
This endpoint initiates the OAuth authentication flow with the specified identity provider. When called, it redirects the user to the provider’s authentication page (e.g., Google login page).- The strategy_name parameter specifies which OAuth provider to use (e.g., “google”, “microsoft”)
- The callback parameter defines where the user will be redirected after successful authentication
- The domain parameter specifies the Circularo instance domain
Authentication Flow
- The user is redirected to the identity provider’s authentication page
- User authenticates with their credentials on the provider’s page
- Upon successful authentication, the provider redirects back to Circularo (domain) URL to finalize the authentication process
- Circularo redirects to your callback URL with a temporary code parameter that must be exchanged for a session token
This endpoint may not be visible in the integrators’ OpenAPI schema, but it is available in the full OpenAPI specification.
code like this:
Step 2 - Exchange temporary code for session token
This endpoint exchanges the temporary code received in the callback for a standard Circularo session token that can be used for API authentication.- The code is single-use and expires shortly if not used
- The resulting token is a standard Circularo session token with the same properties as tokens obtained through direct login
- The token inherits all permissions from the authenticated user
This step completes the OAuth authentication flow, providing you with a standard session token that can be used for all subsequent API calls.
- This token functions exactly like tokens obtained through standard username/password authentication
- It should be included as a query parameter in subsequent API requests
- The token is subject to the same validity period and security rules as standard session tokens
OAuth Integration Summary
OAuth authentication provides a way for users to authenticate with Circularo using their existing identity provider accounts. This approach offers several benefits:- Simplified user experience through single sign-on
- Reduced password management burden
- Leveraging existing identity provider security features
- Consistent authentication experience across applications
Implementation Considerations
When implementing OAuth authentication with Circularo:- Ensure your callback URL is whitelisted by contacting Circularo support
- Implement proper error handling for authentication failures
- Consider the user experience flow, especially for mobile applications
- Be aware that this integration uses endpoints that may only be specified in the full OpenAPI schema
Example Implementation
See our full OpenAPI documentation to learn about the full set of API endpoints and parameters.
Please use proper exception handling and function decomposition in your own code. The code is provided for illustrative purposes only and is not intended for production use.