NewWacht Bench is live — AI-assisted development for Wacht

rotateOAuthClientSecret()

Generates a new client secret for one OAuth client.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function example() {  const client = await wachtClient();  const oauthAppSlug: string = 'oauthappslug';  const oauthClientId: string = 'oauthclientid-123';  return client.oauth.rotateOAuthClientSecret(oauthAppSlug, oauthClientId);}

Signature

function rotateOAuthClientSecret(  oauthAppSlug: string,  oauthClientId: string,): Promise<RotateOAuthClientSecretResponse>

Parameters

oauthAppSlug: string;
OAuth app slug.
oauthClientId: string;
OAuth client id.

Return value

client_secret?: string | undefined;
Newly generated client secret.
client_id?: string | undefined;
OAuth client identifier.

On this page