weyora-digital / ArenaSync

ArenaSync is an advanced eSports platform designed to bring players, organizers, and fans together in one place with Profile Matching Algorithm
MIT License
0 stars 0 forks source link

Admin logout #7

Closed tharoosha closed 1 month ago

tharoosha commented 1 month ago

admin logout routes should be developed and in the frontend admin pannel admin logout button should be displayed

tharoosha commented 1 month ago

do not need to add logout routes in the backend. since I already passed the jwt tokens, what you have to do is clear the jwt token in the local storage and navigate to the admin login page

function logout() { localStorage.removeItem('access_token'); // or remove it from cookies if stored there localStorage.removeItem('refresh_token'); window.location.href = '/login'; // Redirect to login or another page }

raveeshavishwajith commented 1 month ago

Admin logout implemented: tokens cleared and redirected to login.