Skip to content

[SG-823] Undid changes to capture device push token on login#2427

Merged
trmartin4 merged 4 commits intomasterfrom
SG-823-revert-login-device-save
Dec 12, 2022
Merged

[SG-823] Undid changes to capture device push token on login#2427
trmartin4 merged 4 commits intomasterfrom
SG-823-revert-login-device-save

Conversation

@trmartin4
Copy link
Member

@trmartin4 trmartin4 commented Nov 21, 2022

Type of change

- [ ] Bug fix
- [ ] New feature development
- [X] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

In #2404 and #2420, I introduced a change that moved the SaveAsync() for devices so that it saves the device on every login, not just the initial login for that device. The intent was to allow the push token to be sent on the login request and updated at that time.

In the meantime, I have discovered another way to solve this problem more directly and efficiently in the Bitwarden mobile codebase. These changes are included in this mobile PR. Doing these changes will make saving the push token on login redundant and add in a database call on every login for no reason.

This PR reverts those changes in BaseRequestValidator.

Code changes

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@trmartin4 trmartin4 requested a review from a team December 12, 2022 20:38
Copy link
Member

@differsthecat differsthecat left a comment

Choose a reason for hiding this comment

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

This looks good. The only difference I see is that you kept the test changes you did in the previous PR intentionally 👍

@trmartin4 trmartin4 merged commit e340cba into master Dec 12, 2022
@trmartin4 trmartin4 deleted the SG-823-revert-login-device-save branch December 12, 2022 20:51
eliykat pushed a commit that referenced this pull request Jan 10, 2023
* Revert "Set Id property on existing devices so we don't try to create a new one instead of updating existing. (#2420)"

This reverts commit 02e4b10.

* Revert "Update push token on login to allow multiple users on mobile devices (#2404)"

This reverts commit 24469e2.

* Added back test changes.
eliykat pushed a commit that referenced this pull request Jan 10, 2023
* Revert "Set Id property on existing devices so we don't try to create a new one instead of updating existing. (#2420)"

This reverts commit 02e4b10.

* Revert "Update push token on login to allow multiple users on mobile devices (#2404)"

This reverts commit 24469e2.

* Added back test changes.
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