Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tailor-platform/sdk/llms.txt

Use this file to discover all available pages before exploring further.

Commands for managing OAuth2 clients in your Tailor Platform application. OAuth2 clients enable authentication flows for web and mobile applications.

oauth2client

Manage OAuth2 clients in your Tailor Platform application. Usage
tailor-sdk oauth2client [command]
Commands
CommandDescription
oauth2client listList all OAuth2 clients in the application
oauth2client getGet OAuth2 client credentials (including client secret)
When no subcommand is provided, defaults to list.
OAuth2 client commands require your application to have an auth configuration defined with defineAuth() in your tailor.config.ts.

oauth2client list

List all OAuth2 clients in the application. Usage
tailor-sdk oauth2client list [options]
Options
OptionAliasDescriptionRequiredDefault
--json-jOutput as JSONNofalse
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to config fileNo-
Example
tailor-sdk oauth2client list
Output
[
  {
    "name": "web-app",
    "description": "Web application client",
    "clientId": "oauth2_client_abc123",
    "grantTypes": ["authorization_code", "refresh_token"],
    "redirectUris": ["https://example.com/callback"],
    "createdAt": "2024-03-01T10:00:00Z"
  }
]
The list command does not return client secrets. Use the get command to retrieve the complete credentials including the client secret.

oauth2client get

Get OAuth2 client credentials (including client secret). Usage
tailor-sdk oauth2client get [options] <name>
Arguments
ArgumentDescriptionRequired
nameOAuth2 client nameYes
Options
OptionAliasDescriptionRequiredDefault
--json-jOutput as JSONNofalse
--workspace-id <WORKSPACE_ID>-wWorkspace IDNo-
--profile <PROFILE>-pWorkspace profileNo-
--config <CONFIG>-cPath to config fileNo-
Example
tailor-sdk oauth2client get web-app
Output
{
  "name": "web-app",
  "description": "Web application client",
  "clientId": "oauth2_client_abc123",
  "clientSecret": "secret_xyz789",
  "grantTypes": ["authorization_code", "refresh_token"],
  "redirectUris": ["https://example.com/callback"],
  "createdAt": "2024-03-01T10:00:00Z"
}
Security WarningThe client secret is sensitive information. Store it securely and never commit it to version control. The secret is only returned by the get command and should be treated like a password.
Grant Types OAuth2 clients can support different grant types:
  • authorization_code: Standard OAuth2 authorization code flow for web applications
  • refresh_token: Allows clients to obtain new access tokens using refresh tokens
Using OAuth2 Clients OAuth2 clients are used to implement authentication in your applications:
  1. Configure the client in your auth configuration
  2. Use the clientId and clientSecret in your OAuth2 flow
  3. Set up redirect URIs that match your application’s callback URLs
  4. Implement the authorization code flow in your application

Build docs developers (and LLMs) love