infisical icon indicating copy to clipboard operation
infisical copied to clipboard

Deleting organization and cannot login anymore

Open GrbavaCigla opened this issue 1 year ago • 3 comments

Describe the bug

Haven't logged in a while. Wanted to delete everything and start all over. Deleted organization and got both "Success" and "Error" toast, from there everything was bugged. When I refreshed the page it got stuck at loading.

To Reproduce

Steps to reproduce the behavior:

  1. Delete only organization there is

Screenshots

If applicable, add screenshots to help explain your problem. Screenshot of the screen it is now stuck: image

Screenshot of the console: image

Screenshot of the response on failing promise: image

GrbavaCigla avatar Aug 18 '24 22:08 GrbavaCigla

After deleting cookies and site data I can login again, but it was still bugged until I made an organization.

GrbavaCigla avatar Aug 18 '24 23:08 GrbavaCigla

hey @akhilmhdh, the main reason for this issue is when a user deletes the organization then we delete the data from the db but not from the jwt token, because of this the jwt token says the user has the organization ID but the db returns nothing.

Screenshot 2024-08-20 at 12 38 17 AM

Ayush-Dutt-Sharma avatar Aug 19 '24 19:08 Ayush-Dutt-Sharma

@Ayush-Dutt-Sharma @maidul98 i went through this issue and code,i found that we can do two things first one we can blacklist all the tokens associated with the deleted orgId ,second one is while checking the token.organizationId we will check also if it also present in database but i think this will resolve only toast thing other things will be there,what is your suggestion on this ?

Mubashirshariq avatar Sep 06 '24 13:09 Mubashirshariq