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

OAuth2 support (fix #37) #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Anonym-tsk
Copy link

@Anonym-tsk Anonym-tsk commented Oct 5, 2018

Support new OAuth user login from 0.73 - Fix #37

private String mBoostrapData;

UserLoginTask(String uri, String ipAddress, String password) {
mUri = uri;
mIpAddress = ipAddress;
mPassword = password;
mBearerHeader = "Bearer " + password;
Copy link

Choose a reason for hiding this comment

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

I an not familiar with this code base, so this may be a dumb question; could this be replaced with a call to getBearerHeader()?

Copy link
Author

Choose a reason for hiding this comment

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

No, it is not possible here.

@clach04
Copy link

clach04 commented Oct 11, 2018

Looks good to me! 👍

@scottdermott
Copy link

Doesn't work. Also, doesn't follow the OAUTH2 workflow.
Please explain how you get the "Bearer Token" - "Bearer " + password; does not make a token

@Anonym-tsk
Copy link
Author

@scottdermott use Long lived token instead of password. You can create it on HA profile page.

@scottdermott
Copy link

@Anonym-tsk is this a new feature on HA? Not present in 0.77.3

@Anonym-tsk
Copy link
Author

Anonym-tsk commented Oct 17, 2018

Yes. From 0.77 https://www.home-assistant.io/blog/2018/08/29/release-77/
Tokens added to UI in 0.78

@scottdermott
Copy link

Tested & working on 0.80.2

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.

3 participants