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: Regenerate client secret

Regenerate the secret for an OAuth client.

Parameters

Examples

Regenerate OAuth client secret

let client = try await admin.oauth.regenerateClientSecret(
  id: UUID(uuidString: "12345678-1234-1234-1234-123456789012")!
)
// Store the new secret in your secret manager. Do not log it.
if let secret = client.clientSecret {
  try await secretManager.store(secret, name: "oauth-client-secret")
}
print("Rotated the OAuth client secret")