diff --git a/frontend/src/components/app.tsx b/frontend/src/components/app.tsx index ffa1d47..efee7eb 100644 --- a/frontend/src/components/app.tsx +++ b/frontend/src/components/app.tsx @@ -275,7 +275,16 @@ export default class Application extends React.Component { } logout = () => { - // TODO: Tell the server that we're logging ourselves out + // NOTE: No promise, since we don't care about the result + fetch(`${BACKEND_URL}/api/user/logout`, { + headers: new Headers({ + "Content-Type": "application/json", + "Token": this.props.user.sessionToken, + }), + method: "GET", + }); + + // Remove the session locally removeSessionToken(window); this.props.setAuthenticated(false); }