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 HA native OAuth2 flow for google assistant components #16848

Merged
merged 4 commits into from Sep 26, 2018

Conversation

Projects
None yet
3 participants
@awarecan
Contributor

awarecan commented Sep 25, 2018

Description:

Use HA native OAuth2 flow for google assistant components

Google Account Link settings:
image

Advantage
Simplify configuration
Leverage HA user system, different google user can map to different HA user.

Breaking Changes

Need change google account link flow, need re-link account
Need remove client_id, access_token, and agent_user_id from configuration.yaml

Related issue (if applicable): fixes #

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#6357

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

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

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@balloob

This comment has been minimized.

Member

balloob commented Sep 25, 2018

image

@balloob

Awesome!

I think that for client ID, we should add a new page https://www.home-assistant.io/google_assistant/ which can be used as client ID and that whitelists the redirect URI. We did a similar thing for iOS: https://github.com/home-assistant/home-assistant.io/blob/next/source/ios/index.markdown (look at raw version)

Pending docs this looks good to go!

@awarecan

This comment has been minimized.

Contributor

awarecan commented Sep 25, 2018

I don't think we need https://www.home-assistant.io/google_assistant/ redirect URI support. Yes it may looks little better for user experience, but it adds unnecessary dependency between Google Assistant feature and document website.

@balloob balloob merged commit 92a5068 into home-assistant:dev Sep 26, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.03%) to 93.503%
Details

@wafflebot wafflebot bot removed the in progress label Sep 26, 2018

@awarecan awarecan deleted the awarecan:google-assistant-oauth branch Sep 27, 2018

@balloob balloob referenced this pull request Oct 12, 2018

Merged

0.80.0 #17361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment