We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73d09bc commit f71817bCopy full SHA for f71817b
src/ClientContext.tsx
@@ -252,10 +252,19 @@ export const ClientProvider: FC<Props> = ({ children }) => {
252
[client]
253
);
254
255
- const logout = useCallback(() => {
+ const logout = useCallback(async () => {
256
+ await client.logout(undefined, true);
257
clearSession();
258
+ setState({
259
+ client: undefined,
260
+ loading: false,
261
+ isAuthenticated: false,
262
+ isPasswordlessUser: true,
263
+ userName: "",
264
+ error: undefined,
265
+ });
266
history.push("/");
- }, [history]);
267
+ }, [history, client]);
268
269
useEffect(() => {
270
// To protect against multiple sessions writing to the same storage
0 commit comments