Conversation
chenba
reviewed
Feb 14, 2025
| INSERT INTO securityEventNames(name) VALUES ('account.recovery_phone_removed'); | ||
| INSERT INTO securityEventNames(name) VALUES ('account.recovery_codes_replaced'); | ||
| INSERT INTO securityEventNames(name) VALUES ('account.recovery_codes_created'); | ||
| INSERT INTO securityEventNames(name) VALUES ('account.recovery_codes_signin_complete'); |
Contributor
There was a problem hiding this comment.
nit: why not just one INSERT?
Contributor
There was a problem hiding this comment.
oh, to ensure the order of the inserts?
Contributor
Author
There was a problem hiding this comment.
No reason other than copy pasta heh
chenba
reviewed
Feb 14, 2025
| RECOVERY_CODE_COUNT | ||
| ); | ||
|
|
||
| accountEventsManager.recordSecurityEvent(db, { |
Contributor
There was a problem hiding this comment.
I'm presuming that you are not awaiting by choice. But just in case: you are not awaiting. :)
Contributor
Author
There was a problem hiding this comment.
Yea, didn't want to block the request on storing this data.
chenba
reviewed
Feb 14, 2025
| 'account.password_reset_otp_sent': 24, | ||
| 'account.password_reset_otp_verified': 25, | ||
| 'session.destroy': 26, | ||
| 'account.recovery_phone_setup_complete': 27, |
Contributor
There was a problem hiding this comment.
I don't see `'account.recovery_phone_send_code'.
chenba
requested changes
Feb 14, 2025
Contributor
chenba
left a comment
There was a problem hiding this comment.
I think at least one value is missing from the EVENT_NAMES constant, so those id values are off.
bcolsson
approved these changes
Feb 14, 2025
Contributor
Author
|
@chenba Made fixes, looks I forgot to add recording that event. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
This pull request
Issue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-11113
Checklist
Other information (Optional)
On a side note, it feels like the process to add a new security event should be eaiser. Not sure it makes sense to do a database migration everytime we need to add one.