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.
Function Signature
With User Profile
Machine Users Only
Parameters
Auth service name
Auth service configuration object
User profile configuration (mutually exclusive with
machineUserAttributes)TailorDB namespace where the user type is defined. Usually auto-resolved; required only when multiple TailorDBs exist and the type is in an external TailorDB
TailorDB type representing the user
Field name to use as username. Must be a required, unique, non-array string field
Map of user attributes to expose. Keys are field names with
true valuesArray of UUID field names to expose as attribute lists
Machine user attribute fields (mutually exclusive with
userProfile). Record of field definitionsIdentity provider configuration. Use the
.provider() method from defineIdpSCIM configuration for user provisioning
Tenant provider configuration
Enable publishing session events (token issued, refreshed, revoked)
Returns
Defined auth service with the following properties:All other fields from the input config are preserved.
Auth service name
Method to create an auth invoker for machine users:Returns an object with
{ namespace: string, machineUserName: M } compatible with tailor.v1.AuthInvokerExample
With User Profile
Using Auth Invoker
Notes
- You must provide either
userProfileormachineUserAttributes, not both - The function validates this constraint at runtime and throws an error if both are provided
- When using
userProfile, theusernameFieldmust reference a required, unique, non-array string field from the user type - The
attributesmap exposes specific user fields as auth attributes (supports string, boolean, and array types) - The
attributeListarray exposes UUID fields as attribute lists - Machine users are useful for service-to-service authentication
- The
.invoker()method provides a type-safe way to reference machine users in your code