The underlying MonoCloudWebJSClient instance.
This is intended for advanced, lower-level operations that
useAuth does not cover - for example token revocation via
client.oidcClient. Most applications only need useAuth.
"use client";
import { useAuth, useClient } from "@monocloud/auth-react";
export default function RevokeButton() {
const { getTokens } = useAuth();
const client = useClient();
const revoke = async () => {
const tokens = await getTokens();
await client.oidcClient.revokeToken(tokens.accessToken);
};
return <button onClick={() => revoke()}>Revoke</button>;
}
useClient()returns the underlying MonoCloudWebJSClient created by MonoCloudAuthProvider.