Add logout route and controller, remove JWT from user on logout
This commit is contained in:
1 parent
68164b9362
commit
9f4d23b1b4
4 files changed
+26
-1
No files matched your search
@@ -99,9 +99,10 @@ function NavBar() {
|
||||
// Clear auth state
|
||||
dispatch(clearAuthState());
|
||||
dispatch(clearUptimeMonitorState());
|
||||
// Make request to BE to remove JWT from user
|
||||
await axiosIntance.post(
|
||||
"/auth/logout",
|
||||
{},
|
||||
{ user: authState.user },
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${authState.authToken}`,
|
||||
|
||||
Reference in new issue
Block a user