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;
oauthAppSlug: string;OAuth app slug.
›oauthClientId: string;
oauthClientId: string;OAuth client id.
Return value
›client_secret?: string | undefined;
client_secret?: string | undefined;Newly generated client secret.
›client_id?: string | undefined;
client_id?: string | undefined;OAuth client identifier.