For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Swift: AdminAuth().CreateCustomProviderAsync()

Create a custom OAuth 2.0 or OIDC provider.

Examples

Create an OIDC provider

let provider = try await admin.customProviders.create(
  .oidc(
    identifier: "custom:acme",
    name: "Acme",
    clientID: "client-id",
    clientSecret: "client-secret",
    issuer: "https://auth.acme.com"
  )
)

Create an OAuth 2.0 provider

let provider = try await admin.customProviders.create(
  .oauth2(
    identifier: "custom:acme",
    name: "Acme",
    clientID: "client-id",
    clientSecret: "client-secret",
    authorizationURL: URL(string: "https://acme.com/oauth/authorize")!,
    tokenURL: URL(string: "https://acme.com/oauth/token")!,
    userinfoURL: URL(string: "https://acme.com/oauth/userinfo")!
  )
)