-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Add option to login with username/email and password in Habitica integration #117622
Conversation
Hey there @asmfreak, @leikoilja, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rebase and fix the merge conflicts?
After that, I can start reviewing your PR
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
3f4e0b7
to
c5e6b26
Compare
2ac0da8
to
720cb13
Compare
634fc2f
to
aeae1be
Compare
"api_user": "Habitica’s API user ID", | ||
"api_key": "[%key:common::config_flow::data::api_key%]" | ||
"api_user": "User ID", | ||
"api_key": "API Token", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a common key for this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
65d9d0a
to
63a33c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a merge conflict
63a33c2
to
b086010
Compare
…gration (#117622) * add login/password authentication * add advanced config flow * remove unused exception classes, fix errors * update username in init * update tests * update strings * combine steps with menu * remove username from entry * update tests * Revert "update tests" This reverts commit 6ac8ad6. * Revert "remove username from entry" This reverts commit d9323fb. * small changes * remove pylint broad-excep * run habitipy init in executor * Add text selectors * changes
Reopened as new PR because I messed up when resolving merge conflicts.
Proposed change
The Config Flow for setting up the Habitica integration is now a lot more user-friendly. Users can now user their normal username/e-mail and password combination they also use to login to Habitica, instead having to handle with their User ID and API Token. The Config Flow then stores the User ID and API Token which are returned in the JSON response of the login endpoint.
Because Habitica is open source, users could want to connect to a different instance than the official Habitica, even to a self-hosted one. Therefore users can choose between "Login to Habitica" and an "Advanced Configuration". The Advanced Configuration still offers the same options as before, like using User ID and API Token and the URL to point to a different instance. Just an option to disable SSL verification was added, in case it is an instance with a self-signed certificate.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: