Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(auth): properly clear refreshToken in database upon user logout #152

Merged
merged 1 commit into from
May 2, 2024

Conversation

yntpdotme
Copy link
Contributor

Description

This PR addresses issue #147, where the refreshToken value in the database is not properly cleared when users log out. The bug occurs due to setting the refreshToken to undefined, which does not update the database as expected.

Changes Made:

It updates the logout endpoint to set the refreshToken to an empty string ('') instead of undefined, ensuring that it is correctly updated in the database when users log out.

Testing:

  • Manually tested logout functionality to verify successful clearing of refreshToken.
  • Checked for any unintended side effects or regressions.

Additional Notes:

  • No changes to the existing API contract or external behavior are introduced by this fix.
  • The code has been reviewed and follows the coding standards and conventions of the project.

Related Issue:

Screenshots:

  • Login

  • Logged in from Postman
    DB with refreshToken

  • Logout

  • Logged out using Postman
    DB is cleared refreshToken

@yntpdotme yntpdotme changed the title fix: properly clear refreshToken in database upon user logout fix(auth): properly clear refreshToken in database upon user logout May 2, 2024
@arnb-smnta
Copy link
Contributor

Its correct I have tested it
But I cant merge it

@yntpdotme
Copy link
Contributor Author

Thanks @arnb-smnta..!!

Let's wait @wajeshubham will evaluate and merge the changes.

@wajeshubham wajeshubham self-requested a review May 2, 2024 11:32
Copy link

🔗Pullpo.io Slack channel

@wajeshubham wajeshubham merged commit fb947de into hiteshchoudhary:main May 2, 2024
@yntpdotme yntpdotme deleted the fix/auth branch May 2, 2024 13:53
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.

3 participants