2022-03-22 11:15:24 +08:00
---
title: 登出
subtitle: 1 steps
---
Execute signOut() methods will redirect users to the Logto sign out page. After a success sign out, all use session data and auth status will be cleared.
2022-04-06 15:41:29 +08:00
```postLogoutRedirectUris
2022-03-22 11:15:24 +08:00
Post sign out redirect URI
```
Add the following code to your web app
```typescript
import React from "react";
import { useLogto } from '@logto/react ';
const SignOutButton = () => {
const { signOut } = useLogto();
return (
< button onClick = {() = > signOut(window.location.origin)}>Sign out< / button >
);
};
export default SignOutButton;
```