I think we should use foreign key and cascading deletion to make sure the clean deletion. In addition, since token table use extra column to save roles, tenants information, we will enhance auth process to deal with if the user, role or tenant has been deleted and then return the right information.
below is an extra field for a certain token:
{"metadata": {"roles": ["ca43893555be4153acc701568beeec8e", "85c54052d4dc41aba5d1671216766064", "3d3f2139ef514935ba698f40012ddaeb"]}, "user": {"email": "<email address hidden>", "enabled": true, "id": "44c3d88f257a4dc39790c318fcb1a2cc", "name": "admin", "tenantId": null}, "tenant": {"enabled": true, "id": "36cf36c3972a437890e5df7bf9805097", "name": "admin", "description": null}}
I think we should use foreign key and cascading deletion to make sure the clean deletion. In addition, since token table use extra column to save roles, tenants information, we will enhance auth process to deal with if the user, role or tenant has been deleted and then return the right information. 153acc701568bee ec8e", "85c54052d4dc41 aba5d1671216766 064", "3d3f2139ef5149 35ba698f40012dd aeb"]}, "user": {"email": "<email address hidden>", "enabled": true, "id": "44c3d88f257a4d c39790c318fcb1a 2cc", "name": "admin", "tenantId": null}, "tenant": {"enabled": true, "id": "36cf36c3972a43 7890e5df7bf9805 097", "name": "admin", "description": null}}
below is an extra field for a certain token:
{"metadata": {"roles": ["ca43893555be4