Sign in

Component: <SignOut>

<SignOut> renders a link that initiates the MonoCloud sign-out flow.

It can be used in both App Router and Pages Router, and may be rendered from either Server or Client Components.

Props

PropertyTypeDescription
childrenReactNodeContent rendered inside the link (for example, button text).
federated?booleanIf true, also signs the user out of the MonoCloud server session, ensuring the user is fully logged out of MonoCloud and not just your application.
postLogoutUrl?stringURL to redirect the user to after they have been signed out.

Examples

import { SignOut } from "@monocloud/auth-nextjs/components";

export default function Home() {
  return <SignOut>Sign Out</SignOut>;
}
import { SignOut } from "@monocloud/auth-nextjs/components";

export default function Home() {
  return (
    <SignOut federated postLogoutUrl="/goodbye">
      Sign Out
    </SignOut>
  );
}
© 2024 MonoCloud. All rights reserved.