Skip to main content
Version: 4.0.5

Application types

For full Trustdesk setup and REST APIs, see App management and the Trustdesk Admin Hub.

cidaas supports several application types (client_type), each designed for specific use cases and platforms. The type you choose determines:

  • Which OAuth2 flows are available (if any)
  • How redirect URIs are validated
  • Security requirements and best practices
  • User experience patterns and hosted login page capabilities

Valid values defined in the app configuration model: SINGLE_PAGE, REGULAR_WEB, NON_INTERACTIVE, ANDROID, IOS, WINDOWS_MOBILE, HYBRID_APP, DESKTOP, DEVICE, THIRD_PARTY, and SAML_SP.

info
SAML Application Type vs SAML Login Provider

SAML_SP is an application type that represents an external SAML Service Provider — cidaas acts as its SAML 2.0 Identity Provider (IdP), configured via the Trustdesk SAML Identity Provider creation wizard under Integrations → SAML Identity Provider. See SAML SP Integration.

This is separate from enabling SAML as a login provider (SAML IDP Providers) on an OAuth application — configure that under Providers → Identity Providers. See SAML 2.0 Single Sign-On.

Decision Tree: Choosing the Right Application Type​

Overview​

Application type (client_type)Primary use caseClient modelRecommended OAuth flowTrustdesk Location
Single Page Application (SPA) SINGLE_PAGEModern browser-based apps (React, Vue, Angular)Public clientAuthorization Code + PKCEIntegrations → Applications
Regular Web App REGULAR_WEBTraditional server-rendered web applicationsConfidential clientAuthorization Code (with client secret)Integrations → Applications
Android ANDROIDNative Android mobile applicationsPublic clientAuthorization Code + PKCEIntegrations → Applications
iOS IOSNative iOS mobile applicationsPublic clientAuthorization Code + PKCEIntegrations → Applications
Windows Mobile WINDOWS_MOBILENative Windows mobile applicationsPublic clientAuthorization Code + PKCEIntegrations → Applications
Hybrid App HYBRID_APPCross-platform apps (React Native, Flutter, Ionic)Public clientAuthorization Code + PKCEIntegrations → Applications
Desktop DESKTOPNative desktop applications (Windows, macOS, Linux)Public clientAuthorization Code + PKCEIntegrations → Applications
Non-Interactive Client NON_INTERACTIVEBackend services, machine-to-machine APIsConfidential clientClient Credentials FlowIntegrations → Applications
Device DEVICESmart TVs, IoT, limited-input devicesPublic clientDevice Code Flow (RFC 8628)Integrations → Applications
Third Party THIRD_PARTYUntrusted external OAuth clients (deprecated for new apps)Public clientAuthorization Code + PKCEIntegrations → Applications
SAML Identity Provider registration SAML_SPExternal SAML Service Provider where cidaas is IdPSAML IdP AssertionSAML 2.0 Web Browser SSOIntegrations → SAML Identity Provider
info
SAML IdP Configuration Scope

When configuring a SAML_SP application, Trustdesk automatically hides inapplicable OAuth2/OIDC settings (such as grant types, response types, PKCE, token lifetimes, and client secrets) because authentication is negotiated strictly via SAML 2.0 assertions rather than OAuth token endpoints.

warning
Deprecation Notice (THIRD_PARTY)

THIRD_PARTY remains supported for existing integrations but is deprecated for new applications. Prefer explicit OAuth types (SINGLE_PAGE, REGULAR_WEB, or native types) where possible.

Web Applications​

Single Page Application (SPA) vs Regular Web App​

The table below outlines the core architectural and security differences between browser-rendered SPAs and server-rendered web applications:

DimensionSingle Page Application (SINGLE_PAGE)Regular Web App (REGULAR_WEB)
ArchitectureClient-side JavaScript frameworks (React, Vue, Angular, Svelte)Server-side rendering (Node.js, Java Spring, ASP.NET, PHP, Python/Django)
Rendering ModelDynamic DOM updates in browser; API-drivenServer builds HTML; full-page reloads on navigation
Security ModelPublic Client — source code is accessible in browser; cannot securely store client secretsConfidential Client — server environment is secure; can safely store client secrets
Recommended OAuth FlowAuthorization Code Flow with PKCE (S256)Authorization Code Flow (with client secret authentication)
Client Authenticationnone (No client secret)client_secret_post, client_secret_basic, or private_key_jwt
Redirect URI Schemehttps:// (Strict browser origins)https:// (Backend callback endpoints)
Token HandlingEphemeral memory storage or Web Worker (avoid localStorage where XSS is possible)Stored securely in encrypted HTTP-only session cookies on backend

Key Capabilities Matrix for Web Applications​

Capability / SettingSINGLE_PAGEREGULAR_WEB
PKCE RequiredYes (S256 mandatory)Optional (recommended)
Client Secret IssuedNo (Not generated)Yes
Allowed Web Origins (CORS)Configurable (Strict origin matching)Not applicable
Token Introspection via SecretNoYes
Session Transfer / SSOYesYes

Native & Mobile Applications​

Native and mobile applications run on user devices where application binaries can be disassembled, decompiled, or intercepted.

Choosing Among Mobile & Desktop Types​

  • ANDROID: Select when deploying a native Android app using Android Studio / Kotlin / Java or integrating the Android cidaas SDK. Enforces custom schemes or verified Android App Links.
  • IOS: Select when deploying a native iOS/iPadOS app using Xcode / Swift / Objective-C or integrating the iOS cidaas SDK. Enforces custom schemes or Universal Links (apple-app-site-association).
  • HYBRID_APP: Select for cross-platform frameworks such as React Native, Flutter, Ionic, or Capacitor where web runtime wrappers run natively.
  • DESKTOP: Select for native desktop apps (Electron, WPF, macOS Cocoa, Tauri, Qt). Supports loopback redirects (http://127.0.0.1:<port>) or custom protocol handlers.
  • WINDOWS_MOBILE: Legacy client type reserved for backwards compatibility.

Redirect URI & Security Matrix for Native Apps​

Application TypeRedirect URI PatternsPKCE EnforcementDeep Link Validation
ANDROIDCustom URI scheme (e.g. myapp://callback) or HTTPS App LinkMandatory (S256)Android Digital Asset Links (.well-known/assetlinks.json)
IOSCustom URI scheme (e.g. myapp://callback) or HTTPS Universal LinkMandatory (S256)Apple App Site Association (.well-known/apple-app-site-association)
HYBRID_APPCustom URI scheme or App Links / Universal LinksMandatory (S256)Supported on both platforms
DESKTOPLoopback (http://127.0.0.1:port/callback) or custom URI schemeMandatory (S256)OS protocol handler registration
WINDOWS_MOBILECustom URI schemeMandatory (S256)Standard redirect validation

Deep Linking & Mobile Association Files​

To support modern, secure browser redirects (Universal Links on iOS and App Links on Android) without browser popups or intermediate prompts, cidaas automatically generates and hosts the required platform association files at standard .well-known endpoints.

Trustdesk Configuration Requirements​

When creating or editing an IOS or ANDROID application in Trustdesk (Integrations → Applications), provide the platform-specific identity details:

Field in TrustdeskAndroid App (ANDROID)iOS App (IOS)Description / Source
Package Name / Bundle IDpackage_name (e.g., com.example.myapp)bundle_id (e.g., com.example.myapp)Unique app identifier defined in your build.gradle or Xcode target settings.
Key Hash / Team IDkey_hash (SHA-256 fingerprint)team_id (Apple Developer Team ID)For Android: 20-byte SHA-256 certificate fingerprint. For iOS: 10-character alphanumeric Team ID from Apple Developer portal.
warning
Mandatory Fields for Mobile Verification

Association files will only be generated for applications where both fields are provided:

  • Android: Both Package Name and Key Hash must be configured.
  • iOS: Both Team ID and Bundle ID must be configured.
tip
Multi-App Aggregation

When multiple iOS or Android applications are registered in the same tenant, cidaas automatically merges their configuration entries into the respective .well-known endpoints without overwriting existing apps.

Published Endpoints and Response Format​

Once saved in Trustdesk, cidaas serves the association documents dynamically across all custom and standard tenant domains.

1. iOS — GET /.well-known/apple-app-site-association​
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, max-age=900
{
"applinks": {
"apps": [],
"details": [
{
"appID": "9JA6MVXXXX.com.example.myapp",
"paths": [
"/ios/com.example.myapp/*"
]
}
]
},
"activitycontinuation": {
"apps": [
"9JA6MVXXXX.com.example.myapp"
]
},
"webcredentials": {
"apps": [
"9JA6MVXXXX.com.example.myapp"
]
}
}
2. Android — GET /.well-known/assetlinks.json​
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, max-age=900
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.example.myapp",
"sha256_cert_fingerprints": [
"14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"
]
}
}
]

Verification & Troubleshooting​

You can verify that your tenant endpoints are live immediately using curl:

# Verify Apple App Site Association
curl -i https://<your-tenant-domain>/.well-known/apple-app-site-association

# Verify Android Asset Links
curl -i https://<your-tenant-domain>/.well-known/assetlinks.json
info
Cache Behavior

Responses from /.well-known/apple-app-site-association and /.well-known/assetlinks.json include Cache-Control: public, max-age=900 (15 minutes). When updating credentials or package names in Trustdesk, allow up to 15 minutes for intermediate CDN/proxy caches to refresh.

note
Related Mobile SDK & Integration Documentation

For full implementation guides across mobile platforms and SDKs, see:

Example Redirect URIs​

  • Android: com.myapp://oauth/callback
  • iOS: myapp://oauth/callback
  • Desktop: http://127.0.0.1:52134/callback
  • Windows Mobile: ms-app://oauth/callback

Machine-to-Machine & Service Clients​

Non-Interactive Client (NON_INTERACTIVE)​

Purpose: Machine-to-machine (M2M) communication, backend microservices, background jobs, and API-to-API communication.

AttributeSpecification
User Interface❌ None (no hosted login or consent UI)
Security ModelConfidential Client — backend securely stores client credentials
Recommended FlowClient Credentials Flow (grant_type=client_credentials)
Redirect URIs❌ Not applicable (cleared on save)
Token ClaimsIssued based on client allowed scopes (scopes.allowed_scopes)

Typical Use Cases:

  • Daemon services and microservices authenticating to APIs
  • Automated background sync jobs
  • Cron tasks accessing backend endpoints
info
Non-Interactive Scope Constraints

Non-interactive clients do not support user authentication flows, token conditions, or hosted page layouts since there is no user interaction.


Special Purpose & Legacy Clients​

Device (Limited Input Devices) (DEVICE)​

Purpose: Appliances and devices with limited input capabilities (Smart TVs, gaming consoles, IoT devices, network printers).

AttributeSpecification
Recommended FlowDevice Code Flow (RFC 8628 - grant_type=urn:ietf:params:oauth:grant-type:device_code)
Authentication DeviceUser authenticates on a secondary device (smartphone / laptop)
User ExperienceDisplays QR code or URL + 8-character verification code

Authentication Sequence:

  1. Device requests device authorization (POST /authz-srv/device/code).
  2. Device presents verification URL and user_code (or QR code).
  3. User navigates to URL on mobile device/laptop and authenticates.
  4. Device polls token endpoint (POST /token-srv/token) until user completes login.
  5. Device receives access token upon successful user approval.

Third Party (THIRD_PARTY)​

Purpose: External, untrusted OAuth clients where user consent to requested scopes must be explicitly enforced.

warning
Deprecated Application Type

THIRD_PARTY is supported for backwards compatibility but is deprecated for new applications. Use explicit client types (SINGLE_PAGE, REGULAR_WEB, or native types) and configure scope consent in Trustdesk instead.

SAML Identity Provider Registration (SAML_SP)​

Purpose: Register an external Service Provider (SP) application in cidaas so cidaas can act as its SAML 2.0 Identity Provider (IdP).

  • Configured via the Trustdesk SAML Identity Provider creation wizard under Integrations → SAML Identity Provider. See SAML SP Integration for the step-by-step guide.
  • Not an OAuth2 client: grant_types and response_types are omitted.
  • Endpoints are negotiated via standard SAML 2.0 metadata XML exchange.

OAuth Flow Selection Matrix​

The matrix below summarizes the recommended OAuth2/OIDC flows, client secret requirements, and user interaction modes by application type:

Application type (client_type)Recommended OAuth FlowPrimary Grant TypeClient Secret Required?Interactive User Login?
Single Page App SINGLE_PAGEAuthorization Code + PKCEauthorization_code❌ No✅ Yes
Regular Web App REGULAR_WEBAuthorization Codeauthorization_code✅ Yes✅ Yes
Android / iOS / NativeAuthorization Code + PKCEauthorization_code❌ No✅ Yes
Non-Interactive NON_INTERACTIVEClient Credentialsclient_credentials✅ Yes❌ No
Device DEVICEDevice Code (RFC 8628)urn:ietf:params:oauth:grant-type:device_code❌ No✅ Yes
Third Party THIRD_PARTYAuthorization Code + PKCEauthorization_code❌ No✅ Yes
SAML Identity Provider SAML_SPSAML 2.0 Web Browser SSO— (SAML Assertions)Depends on SAML setup✅ Yes

Trustdesk Feature Availability Matrix​

Trustdesk SectionInteractive OAuth Apps (SPA, Web, Native, Device)Non-Interactive (M2M)SAML SP Registration (SAML_SP)
Branding & Hosted Pages✅ Supported❌ InapplicablePartial (Layout styling)
OAuth2 / OIDC Settings✅ SupportedPartial (No redirect URIs)❌ Inapplicable
Authentication & MFA✅ Supported❌ InapplicableSAML IdP Settings
Registration & Field Setup✅ Supported❌ InapplicablePartial
Scope Management✅ Supported✅ SupportedPartial
Token Lifetimes✅ Supported✅ Supported❌ Inapplicable
Signing Key Rotation✅ Supported✅ Supported✅ Supported

For full section mapping, see Configuration sections in App Management.