-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
Unable to setup authentication with Minut Point #91583
Comments
Hey there @fredrike, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) point documentation |
I'm also getting an error during the authentication phase, home assistant is providing a link to configure authorisation, however when I click the link and receive the following error: Granted this is not the same as the original posters error, but this is similar in that I cannot configure or finish the setup of Minut Point with Home Assistant. I had configured the URI to match the documentation i.e. as per the example http://localhost:8123/api/minut, however looking over the Minut API documentation the URL for authentication appears to be different: Where the link provided in Home Assistant is pointing to v5 of the API: |
I can confirm I am having the same issue as @Kimusabi - I am getting the same error:
I had previously enabled Point in the past in home assistant using the same Client ID, Secret and Redirect URI successfully. But I removed the integration from Home Assistant because I was having issues with it - and now am stuck not being able to add it back in. |
The Minut integration is created for the v5 of the API.
Do you run HomeAssistant locally (on the same machine as you are trying to configure the integration) the url must be |
I don't use it locally, in the Minut api-clients section I configured it as |
Any updates on this? I'm having the same issue. |
Going to add another person to the "redirect_uri_mismatch" headache. I have a horrible feeling this has to do with the newish my.homeassistant.io "helper" grabbing the oauth2 stream and putting the wrong URI in it. This appears to have happened to a few other modules but I'm damned if I can work out how to disable it well enough to fully check this. I have a fully ssl setup and access my home assistant setup with https://foo.smackie.io:8123 - the URL that's registered with Minut is https://foo.smackie.io:8123/api/minut and that works - it returns OK when fetched. However, whatever the HA code is returning on the URI reply to OAUTH isn't this. @fredrike - any thoughts on this? |
I get also an error message if I want to authenticate throught the link. I use the internal urls. If I click on the link the browser opens this url: https://api.minut.com/v5/oauth/authorize?response_type=code&client_id=5555&state=66666. After I have done the authentication I get a {"message":"Unable to issue redirect for OAuth 2.0 transaction","code":"server_error","name":"AuthorizationError","error_key":"internal_server_error"}. If the modify the Url to something like this: https://api.minut.com/v8/oauth/authorize?response_type=code&client_id=555&state=666&redirect_uri=http://homeassistant.local:8123/api/minut (modifying from v5 to v8 and add the redirect_uri parameter) I get an Ok message. But the plugin does not get the feedback. I am not sure if this helps but hopefully it put someone to the correct direction. |
Expanding on what @beeper77 has said, which is what got me thinking. I've got to the bottom of this (well, I think I have). I don't know if Minut have accidentally put through changes from a newer API version (as https://api.minut.com/v5 still does suggest it's v5 responding not a later version) but it has changed behavior. Newer versions expect the redirect_uri to be included in BOTH the initial request and then the code-> token exchange request. The current 'pypoint' library which Minut Point uses doesn't include it on either stage. I've seen this before; some implementations of Oauth require it to be specified at request time, some don't, but it appears Minut have moved the goal posts at some point. If it's missing in the first request you get the error as described further up this thread. If it's missing in the second request you get a 'invalid_grant: Invalid Authorization Code' error from the API (tested this manually myself and got consistent results, even if this is an incorrect error message) Sadly my knowledge of python is non existent so I can't suggest the code fixes, but I can lay out what needs to happen: The initial request to /oauth/authorize needs to change from: https://api.minut.com/v5/oauth/authorize?response_type=code&client_id=xxx to be: https://api.minut.com/v5/oauth/authorize?response_type=code&client_id=xxx&redirect_uri=http://yyy (changing xxx and yyy as needed of course) Then (as a CURL example because it's a POST) the code->token request needs to change from: curl -X POST "https://api.minut.com/v5/oauth/token" curl -X POST "https://api.minut.com/v5/oauth/token" (Again, replacing where appropriate) @fredrike I hope this is useful in helping you or someone else make the relevant changes. |
Unfortunately I am having the same issue, anyone been able to resolve it? |
Thanks @tonylucas1870 I'll see if I can update the library to support this. Quite annoying that you version pin and then things change anyway.. |
Same issue here. Hoping for a fix ❤️ |
Any progress? Also hoping for a fix <3 |
Hi, I did have a look at it and yes it seems like they have changed quite a bit for the auth part. My kickstarter account seems to be some kind of basic+ account and API is only available for pro plan users. If Minut doesn't upgrade my account I will not have means of testing the new protocol, hence I I think we unfortunately have to pull Minut support from Ha. |
I have read on othter forums that just an email to minut where you remind
them that you are a kickstarter backer and they will enable the API for you.
Try!
…On Sun, Sep 17, 2023 at 8:46 AM Fredrik Erlandsson ***@***.***> wrote:
Hi,
I did have a look at it and yes it seems like they have changed quite a
bit for the auth part. My kickstarter account seems to be some kind of
basic+ account and API is only available for pro plan users. If Minut
doesn't upgrade my account I will not have means of testing the new
protocol, hence I I think we unfortunately have to pull Minut support from
Ha.
—
Reply to this email directly, view it on GitHub
<#91583 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZLEZQDNDPBGSNUWFJUC3LX22MEPANCNFSM6AAAAAAXCGKWBA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I've found a solution for the auth issue, here is a fix: fredrike@d2eaf12 I've found some other issues too so will try to mitigate them too. |
Great, thanks for the effort! Will this be available in the next HA update? :) |
When I apply these 2 patches it doesn't start up for me as I get an error
when it starts up:
Error during setup of component point
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 288, in
_async_setup_component
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/point/__init__.py",
line 71, in async_setup
config_flow.register_flow_implementation(
TypeError: register_flow_implementation() missing 1 required
positional argument: 'redirect_uri'
I tried changing it a bit but not managed to get it working.
Rob
…On Mon, 25 Sept 2023 at 13:54, ripburger ***@***.***> wrote:
Great, thanks for the effort! Will this be available in the next HA
update? :)
—
Reply to this email directly, view it on GitHub
<#91583 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O47V4B4EN2GMMDJPYBM3X4F5JHANCNFSM6AAAAAAXCGKWBA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Who knows, the high quality requirements are holding my fix back so it might come down to the Point integration will be pulled #101967 (comment) |
@fredrike I for one really appreciate your efforts!! |
Any update on this? |
I would love for this to be fixed. Is there someone in the HA core group that could potentially help out with this? |
I have a working solution but it doesn't adhere to the standards in Ha I have not had time to re-write it. |
I'd love to help, I'm an software engineer but I don't tend to do a lot of coding anymore and I'm not that familiar with Python. However, is your code in a branch somewhere that people can pull and see if they can get it adhere to the standards. |
Yes, that version works but it is not OK to add more config options.. |
I suggest you to have a look at this as that is working but needs adoption to the new oauth flow.. https://github.com/fredrike/home-assistant/tree/point-redirect-uri |
Would love to see this fixed, if there is any testing or assistance I can provide please let me know. |
Yes, Point API configured with Redirect URI if that is what you meant. Weird, reloaded Home Assistant again and then the "normal" authentication window came up: but, after clicking link and logged in https://api.minut.com/v5/oauth/decision: |
I think you should paste the redirect URI in the dialog, strange that the translation didn't work. |
Ok, I copypasted my redirect URI on the same browser tab with Point API consent dialog and: http://homeassistant.local:8123/api/minut but HA window shows when I click Submit: |
I get this same error, unfortunately! |
I'll do some more testing and get back to you, sorry for this. |
Dont be sorry, we're (or I at least) just too impatient 🤣 |
How do you remove the Point integration that cannot be configured? Under Integrations I have "Discovered" showing the Minut Point, with the only option being to Configure. Until it is configured then I don't seem to have the option to delete it, but of course the configuration doesn't work. |
Ok I did some more testing and it seems like we have to use the I'm still working on getting this to work but if you like to try use the zip above and extract so you have a |
I actually went this route myself and results were the ones I posted here last week. I didn't remove the "original" plugin though. |
Try to remove the original too, as we need to make sure that it is loaded correctly. |
Any progress with this? I tried to remove the original plugin but it didn't have any effect though. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Is there any recent updates on this integration? I can test this again if this should work now. |
Tried yesterday and it’s still failing even though it’s properly authenticated on the Point side. I get an Ok! But when clicking Submit it’s showing the error message. Soon HA Core will clear this out if there’s no resolution.Sent from my iPhoneOn 21 May 2024, at 03:41, juntta ***@***.***> wrote:
Is there any recent updates on this integration?
I can test this again if this should work now.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I'm terrible sorry for not updating you on this. The problem is that although I have a working solution it doesn't follow the standards of HA so it will not get merged. I've been swamped with work both professionally and privately hence have not priortized to get it merged to HA. I would however try to find some time in the near future to get this to follow the standards and get merged.. Just a teaser, this is how it looks when it is working (UniFi Network is shown as we are using the same identifier). |
Omg, that looks awesome!
Den tis 21 maj 2024 09:55Fredrik Erlandsson ***@***.***>
skrev:
… I'm terrible sorry for not updating you on this. The problem is that
although I have a working solution it doesn't follow the standards of HA so
it will not get merged.
I've been swamped with work both professionally and privately hence have
not priortized to get it merged to HA. I would however try to find some
time in the near future to get this to follow the standards and get merged..
Just a teaser, this is how it looks when it is working (UniFi Network is
shown as we are using the same identifier).
image.png (view on web)
<https://github.com/home-assistant/core/assets/676999/e6ea6add-7a1a-4fac-b7eb-45f3827b3d66>
—
Reply to this email directly, view it on GitHub
<#91583 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK5RZTG2Z7TZUPWTP6YD4T3ZDL4XFAVCNFSM6AAAAAAXCGKWBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRHE4TCMBSGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm happy to contribute to a pizza/beer/coffee fund to get this work done.
I'm sure others would be too.
Rob
…On Tue, 21 May 2024 at 13:44, FerretMonger ***@***.***> wrote:
Omg, that looks awesome!
Den tis 21 maj 2024 09:55Fredrik Erlandsson ***@***.***>
skrev:
> I'm terrible sorry for not updating you on this. The problem is that
> although I have a working solution it doesn't follow the standards of HA
so
> it will not get merged.
>
> I've been swamped with work both professionally and privately hence have
> not priortized to get it merged to HA. I would however try to find some
> time in the near future to get this to follow the standards and get
merged..
>
> Just a teaser, this is how it looks when it is working (UniFi Network is
> shown as we are using the same identifier).
>
> image.png (view on web)
> <
https://github.com/home-assistant/core/assets/676999/e6ea6add-7a1a-4fac-b7eb-45f3827b3d66>
>
> —
> Reply to this email directly, view it on GitHub
> <
#91583 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AK5RZTG2Z7TZUPWTP6YD4T3ZDL4XFAVCNFSM6AAAAAAXCGKWBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRHE4TCMBSGQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#91583 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5O47TO7KL2JJXPQZE5MD3ZDM6RTAVCNFSM6AAAAAAXCGKWBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSGU2TEOBXHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
What Rob said.
/Jörgen
Den tis 21 maj 2024 17:02robkirk ***@***.***> skrev:
… I'm happy to contribute to a pizza/beer/coffee fund to get this work done.
I'm sure others would be too.
Rob
On Tue, 21 May 2024 at 13:44, FerretMonger ***@***.***> wrote:
> Omg, that looks awesome!
>
> Den tis 21 maj 2024 09:55Fredrik Erlandsson ***@***.***>
> skrev:
>
> > I'm terrible sorry for not updating you on this. The problem is that
> > although I have a working solution it doesn't follow the standards of
HA
> so
> > it will not get merged.
> >
> > I've been swamped with work both professionally and privately hence
have
> > not priortized to get it merged to HA. I would however try to find
some
> > time in the near future to get this to follow the standards and get
> merged..
> >
> > Just a teaser, this is how it looks when it is working (UniFi Network
is
> > shown as we are using the same identifier).
> >
> > image.png (view on web)
> > <
>
https://github.com/home-assistant/core/assets/676999/e6ea6add-7a1a-4fac-b7eb-45f3827b3d66>
>
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <
>
#91583 (comment)>,
>
> > or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AK5RZTG2Z7TZUPWTP6YD4T3ZDL4XFAVCNFSM6AAAAAAXCGKWBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRHE4TCMBSGQ>
>
> > .
> > You are receiving this because you commented.Message ID:
> > ***@***.***>
> >
>
> —
> Reply to this email directly, view it on GitHub
> <
#91583 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AB5O47TO7KL2JJXPQZE5MD3ZDM6RTAVCNFSM6AAAAAAXCGKWBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSGU2TEOBXHA>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#91583 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK5RZTC6O47KF4Q4MSEDHE3ZDNOXVAVCNFSM6AAAAAAXCGKWBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSHA2DAMZQG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
👍👍 |
Let's move all discussion to the forum, https://community.home-assistant.io/t/integration-with-minut-point/8749. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
I'm waiting for review on #118243.. |
The problem
I have created a client secret in api.minut.com and inserted these credentials into my configuration.yaml file. Home Assistant then detects this and shows me a 'Discovered' and 'Configure' button.
When I click this is shows me a dialogue with a 'Link' button on this which is supposed to accept the Access. Whenever I do this I get a web page served from Minut asking me to Grant Home Assistant permission. When I do this I get the following JSON returned
{"message":"Unable to issue redirect for OAuth 2.0 transaction","code":"server_error","status":500,"name":"AuthorizationError","error_key":"internal_server_error"}
My Home Assistant has external internet access which has worked for over a year successfully.
What version of Home Assistant Core has the issue?
core-2023.4.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Minut Point
Link to integration documentation on our website
https://www.home-assistant.io/integrations/point/
Diagnostics information
Unable to find any 'Minut' log lines in the Home Assistant log.
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I have had this working a few months ago but Minut may have changed something as when I renewed my subscription it said I was on a Legacy Pro plan.
Note I am still a Pro subscriber.
The text was updated successfully, but these errors were encountered: