Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Add a Custom IdP

You can connect any OAuth2 or OIDC-compliant identity provider to Aero2.

Requirements

You need the following information from your identity provider:

FieldDescription
Client IDOAuth client identifier
Client SecretOAuth client secret
Authorization EndpointURL where users authenticate
Token EndpointURL to exchange codes for tokens
UserInfo EndpointURL to fetch user profile
ScopesScopes to request (space-separated)

Configure via Admin API

curl -X POST https://aero2.dev/api/idps \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-provider",
    "type": "oauth2",
    "display_name": "My Identity Provider",
    "client_id": "your-client-id",
    "client_secret": "your-client-secret",
    "authorization_endpoint": "https://provider.example.com/authorize",
    "token_endpoint": "https://provider.example.com/token",
    "userinfo_endpoint": "https://provider.example.com/userinfo",
    "scopes": "openid profile email"
  }'

Provider Type

TypeWhen to use
oauth2Provider uses standard OAuth2 (e.g., GitHub, Facebook)
oidcProvider supports OpenID Connect (e.g., Google, Azure AD)

UserInfo Response Mapping

Aero2 expects the UserInfo endpoint to return a JSON object. It looks for these fields:

FieldFallbacksUsed for
emailmailUser's email
namedisplayName, loginDisplay name
pictureavatar_url, photoProfile image
subid, user_idProvider user ID

Managing Providers

# List all providers
curl https://aero2.dev/api/idps
 
# Update a provider
curl -X PUT https://aero2.dev/api/idps/<id> \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{"display_name": "Updated Name"}'
 
# Disable a provider
curl -X PUT https://aero2.dev/api/idps/<id> \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'
 
# Delete a provider
curl -X DELETE https://aero2.dev/api/idps/<id> \
  -H "Authorization: Bearer <admin_token>"

See Also