[GH-ISSUE #1011] API token deletion not reflected in cache until page reload #308

Closed
opened 2026-02-26 18:46:25 +03:00 by kerem · 17 comments
Owner

Originally created by @ashrafchowdury on GitHub (Mar 9, 2024).
Original GitHub issue: https://github.com/documenso/documenso/issues/1011

Issue Description

After deleting the API token, the token still persists in the cache. Despite the deletion process, the token remains accessible until the page is manually reloaded. This inconsistency poses a potential security risk.

Also, the 'Token expiration date' field is not clear after successfully creating the API token.

Steps to Reproduce

  1. Log in to the app,
  2. Navigate to the settings or profile section where API tokens are managed.
  3. Create a new API token.
  4. Then delete that API token.
  5. Notice that the deleted token is still accepted and functional.
  6. Manually reload the page to remove the token from the display

Expected Behavior

The API token should be immediately removed from the cache after successfully deleting it from the database.

Current Behavior

The API token remains accessible and functional even after deletion until the page is manually reloaded.

Screenshots (optional)

https://github.com/documenso/documenso/assets/87828904/187c5565-d2c5-42b0-b698-5c978045076a

Operating System [e.g., Windows 10]

Windows 11

Browser [e.g., Chrome, Firefox]

Chrome, Edge

Version [e.g., 2.0.1]

Latest

Please check the boxes that apply to this issue report.

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
  • I want to work on creating a PR for this issue if approved
Originally created by @ashrafchowdury on GitHub (Mar 9, 2024). Original GitHub issue: https://github.com/documenso/documenso/issues/1011 ### Issue Description After deleting the API token, the token still persists in the cache. Despite the deletion process, the token remains accessible until the page is manually reloaded. This inconsistency poses a potential security risk. Also, the 'Token expiration date' field is not clear after successfully creating the API token. ### Steps to Reproduce 1. Log in to the app, 2. Navigate to the settings or profile section where API tokens are managed. 3. Create a new API token. 4. Then delete that API token. 5. Notice that the deleted token is still accepted and functional. 6. Manually reload the page to remove the token from the display ### Expected Behavior The API token should be immediately removed from the cache after successfully deleting it from the database. ### Current Behavior The API token remains accessible and functional even after deletion until the page is manually reloaded. ### Screenshots (optional) https://github.com/documenso/documenso/assets/87828904/187c5565-d2c5-42b0-b698-5c978045076a ### Operating System [e.g., Windows 10] Windows 11 ### Browser [e.g., Chrome, Firefox] Chrome, Edge ### Version [e.g., 2.0.1] Latest ### Please check the boxes that apply to this issue report. - [X] I have searched the existing issues to make sure this is not a duplicate. - [X] I have provided steps to reproduce the issue. - [X] I have included relevant environment information. - [X] I have included any relevant screenshots. - [X] I understand that this is a voluntary contribution and that there is no guarantee of resolution. - [X] I want to work on creating a PR for this issue if approved
Author
Owner

@ashrafchowdury commented on GitHub (Mar 9, 2024):

I would like to work on this issue if it gets approved.

<!-- gh-comment-id:1986730153 --> @ashrafchowdury commented on GitHub (Mar 9, 2024): **I would like to work on this issue if it gets approved.**
Author
Owner

@dguyen commented on GitHub (Mar 13, 2024):

Thanks, assigned it to you :)

<!-- gh-comment-id:1993689285 --> @dguyen commented on GitHub (Mar 13, 2024): Thanks, assigned it to you :)
Author
Owner

@SaiSawant1 commented on GitHub (Mar 27, 2024):

@ashrafchowdury are you working on this?

<!-- gh-comment-id:2022780652 --> @SaiSawant1 commented on GitHub (Mar 27, 2024): @ashrafchowdury are you working on this?
Author
Owner

@ashrafchowdury commented on GitHub (Mar 28, 2024):

@ashrafchowdury are you working on this?

Yes.

<!-- gh-comment-id:2024511815 --> @ashrafchowdury commented on GitHub (Mar 28, 2024): > @ashrafchowdury are you working on this? Yes.
Author
Owner

@rushatgabhane commented on GitHub (Apr 24, 2024):

Hey, @ashrafchowdury it's been almost two months since you were assigned. How's it looking? Do you need help?

<!-- gh-comment-id:2074621575 --> @rushatgabhane commented on GitHub (Apr 24, 2024): Hey, @ashrafchowdury it's been almost two months since you were assigned. How's it looking? Do you need help?
Author
Owner

@rushatgabhane commented on GitHub (Apr 24, 2024):

I'd love to work on this issue if that's okay. I aim to complete it in 3 days

<!-- gh-comment-id:2074873425 --> @rushatgabhane commented on GitHub (Apr 24, 2024): I'd love to work on this issue if that's okay. I aim to complete it in 3 days
Author
Owner

@ElTimuro commented on GitHub (Apr 25, 2024):

@ashrafchowdury are you actively working on this? Otherwise I'm reassigning tomorrow..

<!-- gh-comment-id:2076905212 --> @ElTimuro commented on GitHub (Apr 25, 2024): @ashrafchowdury are you actively working on this? Otherwise I'm reassigning tomorrow..
Author
Owner

@ashrafchowdury commented on GitHub (Apr 26, 2024):

@ashrafchowdury are you actively working on this? Otherwise I'm reassigning tomorrow..

I'm really sorry for the late reply @ElTimuro, I not working on this issue currently feel free to assign someone else.

Again, I apologize for not taking any action on it.

<!-- gh-comment-id:2078609692 --> @ashrafchowdury commented on GitHub (Apr 26, 2024): > @ashrafchowdury are you actively working on this? Otherwise I'm reassigning tomorrow.. I'm really sorry for the late reply @ElTimuro, I not working on this issue currently feel free to assign someone else. Again, I apologize for not taking any action on it.
Author
Owner

@ElTimuro commented on GitHub (Apr 26, 2024):

@rushatgabhane afaik you have another issue, you want to take this one as well? Please be mindful if 2 in parralel are too much :D

<!-- gh-comment-id:2078956505 --> @ElTimuro commented on GitHub (Apr 26, 2024): @rushatgabhane afaik you have another issue, you want to take this one as well? Please be mindful if 2 in parralel are too much :D
Author
Owner

@ElTimuro commented on GitHub (Apr 26, 2024):

@ashrafchowdury it's fine, thanks for letting me know

<!-- gh-comment-id:2078957061 --> @ElTimuro commented on GitHub (Apr 26, 2024): @ashrafchowdury it's fine, thanks for letting me know
Author
Owner

@cchirag commented on GitHub (Apr 29, 2024):

Can I work on this?

<!-- gh-comment-id:2082631677 --> @cchirag commented on GitHub (Apr 29, 2024): Can I work on this?
Author
Owner

@ElTimuro commented on GitHub (Apr 29, 2024):

  • @cchirag if @rushatgabhane declines you can have it
  • @rushatgabhane, since you asked first, do you still want to do this?
<!-- gh-comment-id:2082743634 --> @ElTimuro commented on GitHub (Apr 29, 2024): - @cchirag if @rushatgabhane declines you can have it - @rushatgabhane, since you asked first, do you still want to do this?
Author
Owner

@cchirag commented on GitHub (Apr 29, 2024):

Cool @ElTimuro . Let me know if @rushatgabhane chooses to decline. Thank you.

<!-- gh-comment-id:2083486411 --> @cchirag commented on GitHub (Apr 29, 2024): Cool @ElTimuro . Let me know if @rushatgabhane chooses to decline. Thank you.
Author
Owner

@rushatgabhane commented on GitHub (Apr 30, 2024):

@ElTimuro i was interested, but it looks like @cchirag already raised a PR 😅
So maybe we just assign them, what do you think?

<!-- gh-comment-id:2086554498 --> @rushatgabhane commented on GitHub (Apr 30, 2024): @ElTimuro i was interested, but it looks like @cchirag already raised a PR 😅 So maybe we just assign them, what do you think?
Author
Owner

@cchirag commented on GitHub (Apr 30, 2024):

Hey @rushatgabhane, sorry for picking up the task. The fix seemed straightforward and we had not heard from you in 4 days. But, I guess you can review my PR and maybe share it with us if you have a better approach.

<!-- gh-comment-id:2086751305 --> @cchirag commented on GitHub (Apr 30, 2024): Hey @rushatgabhane, sorry for picking up the task. The fix seemed straightforward and we had not heard from you in 4 days. But, I guess you can review my PR and maybe share it with us if you have a better approach.
Author
Owner

@rushatgabhane commented on GitHub (Apr 30, 2024):

@cchirag don't worry about it, it's all good : )

<!-- gh-comment-id:2086859984 --> @rushatgabhane commented on GitHub (Apr 30, 2024): @cchirag don't worry about it, it's all good : )
Author
Owner

@cchirag commented on GitHub (Apr 30, 2024):

Thanks man @rushatgabhane . @ElTimuro can you please review the PR.

<!-- gh-comment-id:2087185844 --> @cchirag commented on GitHub (Apr 30, 2024): Thanks man @rushatgabhane . @ElTimuro can you please review the PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#308
No description provided.