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

Use auth token in Ezviz #54663

Merged
merged 22 commits into from
Mar 29, 2023
Merged

Conversation

RenierM26
Copy link
Contributor

@RenierM26 RenierM26 commented Aug 15, 2021

Proposed change

-Changes ezviz authentication to make use of token instead of username/password. This will allow users to re-enable MFA on Ezviz account after initial setup.

Not really a breaking change but users will need to reauthenticate.

Tip for testers:
In the ezviz android app, you can remove "terminal bindings" on the same screen as where you enable MFA (MFA needs to be enabled). This revokes a long live token. The integration would then need to reauth. (just remember to disable MFA again)

Implementing MFA should be much easier after this pull request is merged.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @BaQs, mind taking a look at this pull request as it has been labeled with an integration (ezviz) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@MartinHjelmare MartinHjelmare changed the title Ezviz auth token patch1 Use auth token in Ezviz Aug 15, 2021
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 15, 2021
@github-actions github-actions bot closed this Sep 26, 2021
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Sep 27, 2021
@RenierM26 RenierM26 force-pushed the ezviz_auth_token_patch1 branch from f3b6a3d to c9c6d95 Compare October 12, 2021 04:45
@RenierM26 RenierM26 force-pushed the ezviz_auth_token_patch1 branch 2 times, most recently from d7c967a to 5ce4ec6 Compare November 16, 2021 05:11
@RenierM26 RenierM26 force-pushed the ezviz_auth_token_patch1 branch from 5ce4ec6 to c076ef7 Compare November 22, 2021 04:40
@frenck
Copy link
Member

frenck commented Jan 3, 2022

@RenierM26 Could you resolve the merge conflict by rebasing this PR onto the latest dev branch?

@frenck frenck removed the smash Indicator this PR is close to finish for merging or closing label Jan 3, 2022
@RenierM26 RenierM26 force-pushed the ezviz_auth_token_patch1 branch from c99ccf4 to b045894 Compare January 4, 2022 04:40
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 10, 2022
@frenck
Copy link
Member

frenck commented Apr 10, 2022

not really stale, just happening a lot. Sorry, but it (again) needs rebasing :(

@github-actions github-actions bot removed the stale label Apr 10, 2022
@RenierM26 RenierM26 force-pushed the ezviz_auth_token_patch1 branch from b045894 to a73027e Compare April 15, 2022 10:54
@RenierM26 RenierM26 force-pushed the ezviz_auth_token_patch1 branch from ca811b7 to 6f2d5e0 Compare March 18, 2023 09:30
@balloob balloob added this to the 2023.4.0 milestone Mar 29, 2023
@balloob
Copy link
Member

balloob commented Mar 29, 2023

Looks good, it will be in 2023.4…thanks for bearing with us.

@balloob balloob merged commit 93d1961 into home-assistant:dev Mar 29, 2023
balloob added a commit that referenced this pull request Mar 30, 2023
* Initial commit

* Revert "Initial commit"

This reverts commit 452027f1a3c1be186cedd4115cea6928917c9467.

* Change ezviz to token auth

* Bump API version.

* Add fix for token expired. Fix options update and unload.

* Fix tests (PLATFORM to PLATFORM_BY_TYPE)

* Uses and stores token only, added reauth step when token expires.

* Add tests MFA code exceptions.

* Fix tests.

* Remove redundant try/except blocks.

* Rebase fixes.

* Fix errors in reauth config flow

* Implement recommendations

* Fix typing error in config_flow

* Fix tests after rebase, readd camera check on init

* Change to platform setup

* Cleanup init.

* Test for MFA required under user form

* Remove useless if block.

* Fix formating after rebase

* Fix formating.

* No longer stored in the repository

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2023
@RenierM26 RenierM26 deleted the ezviz_auth_token_patch1 branch May 21, 2023 05:39
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Please address the comments in a new PR. Thanks!

homeassistant/components/ezviz/__init__.py Show resolved Hide resolved
homeassistant/components/ezviz/__init__.py Show resolved Hide resolved
homeassistant/components/ezviz/__init__.py Show resolved Hide resolved
homeassistant/components/ezviz/const.py Show resolved Hide resolved
homeassistant/components/ezviz/config_flow.py Show resolved Hide resolved
homeassistant/components/ezviz/config_flow.py Show resolved Hide resolved
homeassistant/components/ezviz/config_flow.py Show resolved Hide resolved
@home-assistant home-assistant unlocked this conversation Jun 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants