Skip to content

Add logout button on dashboard page#254

Open
Shrrutii29 wants to merge 1 commit into
TanmayKalra09:mainfrom
Shrrutii29:feature/logout-btn
Open

Add logout button on dashboard page#254
Shrrutii29 wants to merge 1 commit into
TanmayKalra09:mainfrom
Shrrutii29:feature/logout-btn

Conversation

@Shrrutii29
Copy link
Copy Markdown

🚀 Pull Request

📋 Description

Added a Logout button on the dashboard. Clicking the button removes accessToken and refreshToken from localStorage, calls the backend logout API with credentials, and redirects the user to the login page.

Note: Make sure to set VITE_BACKEND_URL in your .env file before running the frontend.

Fixes #220

🔍 Type of Change

  • Bug fix 🐞
  • New feature ✨
  • Documentation update 📝
  • Refactoring or code improvement ♻️
  • Other (please describe):

🙋 Your Details

🧪 How Has This Been Tested?

Registered a test user via the signup API.
Logged in via the frontend and verified tokens were set in localStorage.

Clicked Logout button:

  • Tokens were removed from localStorage.
  • Backend logout API called successfully with credentials.
  • User redirected to /login.

📸 Screenshots (if applicable)

Before After

✅ Checklist

  • I have read the contributing guidelines.
  • I have followed the code style and linting rules.
  • I have added tests or explained why not.
  • I have updated documentation (if needed).
  • My changes do not introduce any known security issues or vulnerabilities.

Note: Make sure to set VITE_BACKEND_URL in your .env file before running the frontend.

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 18, 2025

@Shrrutii29 is attempting to deploy a commit to the Tanmay Kalra's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shrrutii29
Copy link
Copy Markdown
Author

@TanmayKalra09 please checkout this pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Logout Button on Dashboard

1 participant