Token Revocation on Secondary Email Removal
When we remove a secondary email address, we should revoke all other accessible tokens except the current to ensure security. Otherwise, even after the email is removed, it may take up to a time(7 days) for access to be fully revoked.
- Domain
- AuthN-Z
- Action
- fix
- Department
- Backend
Log in to comment and vote
Comments2
tadael shewarega
May 8, 2025
tadael shewarega
May 8, 2025
additional issue:
we currently revoke the apple token only when a user's account is deleted which removes the user's apple connection to the Aladia app however we either need to store the apple refresh token outside the connected accounts field in the user document or ensure we revoke the token when the user disconnects apple from their Aladia account
the reason is that we store the apple refresh token in the user's connected accounts array if the user disconnects apple before their account is deleted and we don’t have the refresh token to revoke the connection at that point we lose access to refresh token, since it was stored in the connected accounts array then when the user eventually deletes their account we’re unable to revoke the apple token
why do we need to revoke it when a user registers using apple apple provides their first and last name but only on the first request subsequent requests do not include the user's name so if we revoke the apple token and the user connects again we can get their name from apple response,