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

Clear email tokens on email update #2131

Merged
merged 1 commit into from
Feb 3, 2024
Merged

Clear email tokens on email update #2131

merged 1 commit into from
Feb 3, 2024

Conversation

dholms
Copy link
Collaborator

@dholms dholms commented Feb 3, 2024

@@ -327,7 +327,7 @@ export class AccountManager {
await this.db.transaction((dbTxn) =>
Promise.all([
account.updateEmail(dbTxn, did, email),
emailToken.deleteEmailToken(dbTxn, did, 'update_email'),
emailToken.deleteAllEmailTokens(dbTxn, did),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to run this even when there is no token?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup I believe so

becuase we want to clear all tokens regardless since they were associated with the old email

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I actually meant that it wasn't being run in that case and I figured we might want to!

@dholms dholms merged commit b6b854a into main Feb 3, 2024
10 checks passed
@dholms dholms deleted the delete-email-tokens-main branch February 3, 2024 22:52
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.

2 participants