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

Unable to setup Home Connect - fails with client or redirection URI not authorized #74000

Closed
vk2him opened this issue Jun 26, 2022 · 17 comments
Closed

Comments

@vk2him
Copy link

vk2him commented Jun 26, 2022

The problem

I've had the Home Connect integration working for a long time - today it stoped working and when I try to reinstall I get this error which opens in a new tab:
{
"error": "unauthorized_client",
"error_description": "client or redirection URI not authorized",
"state": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbG93X2lkIjoiOTI5MzE3OTBiMWQ1ZmJlNzEzODY5NjEzMTFjNTVkMmEiLCJyZWRpcmVjdF91cmkiOiJodHRwczovL215LmhvbWUtYXNzaXN0YW50LmlvL3JlZGlyZWN0L29hdXRoIn0.jua7oFgTTopLEGqsDWoEAg5dDpcaHam6QMtB9joNGU8"
}

I tried creating a new Application in the Home Connect Developer website but it fails with same error

What version of Home Assistant Core has the issue?

Core 2022.6.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Home Connect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/home_connect

Diagnostics information

None

Example YAML snippet

NA

Anything in the logs that might be useful for us?

This appears on the webpage that opens when installing integration:

{
  "error": "unauthorized_client",
  "error_description": "client or redirection URI not authorized",
  "state": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbG93X2lkIjoiOTI5MzE3OTBiMWQ1ZmJlNzEzODY5NjEzMTFjNTVkMmEiLCJyZWRpcmVjdF91cmkiOiJodHRwczovL215LmhvbWUtYXNzaXN0YW50LmlvL3JlZGlyZWN0L29hdXRoIn0.jua7oFgTTopLEGqsDWoEAg5dDpcaHam6QMtB9joNGU8"
}

Additional information

No response

@probot-home-assistant
Copy link

home_connect documentation
home_connect source
(message by IssueLinks)

@probot-home-assistant
Copy link

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

@MuppetOwl
Copy link

Can also confirm same issue. I had a working setup about 1 month ago, but did remove it to add again because of troubleshooting some other issues, and its no longer possible to setup.

@NewsGuyTor
Copy link

Same issue here.

@filzer666
Copy link

Same here, trying for days now :/

@kroimon
Copy link
Contributor

kroimon commented Jul 1, 2022

@allenporter Mind taking a look at this issue as you have been working on the new application_credentials platform integration (#71988)?

@allenporter
Copy link
Contributor

Hi -- see updated pre-reqs in https://www.home-assistant.io/integrations/home_connect/#prerequisites and https://www.home-assistant.io/blog/2022/06/01/release-20226/#streamlining-the-oauth2-experience -- in particular the redirect url was changed.

This is not related to application credentials, but generally i have been helping home connect users and in all cases we've seen before issues have been due to misconfiguration or needing an updated configuration.

@allenporter
Copy link
Contributor

(I don't have a home connect device, but did sign up for the developer program and tested it all out etc so my help can only go so far)

@jarrah31
Copy link

jarrah31 commented Jul 2, 2022

I had the same problem - my redirect url within Home-Connect's Application site was pointing to a local IP, so I changed it to https://my.home-assistant.io/redirect/oauth as described in the prerequisites and it worked for me!

@jarrah31
Copy link

jarrah31 commented Jul 3, 2022

@allenporter thanks for all your work on OAuth2 and for making things easier to use with HA - much appreciated!

@ZyberSE
Copy link

ZyberSE commented Jul 3, 2022

I've probably just missed something but after removing my old Home Connect integration (was very buggy) I tried to set it up again but are running into this exact problem.

I've tried with the new my: and the new link but what ever I do I get the same error "client or redirection URI not authorized".

Is there something else that has changed that I need to adress?

@allenporter
Copy link
Contributor

The redirect url was updated and you are not meeting the pre-requisites specified here https://www.home-assistant.io/integrations/home_connect/#prerequisites -- those steps talk about setting it up, but the steps for editing the url are:

@ZyberSE
Copy link

ZyberSE commented Jul 3, 2022 via email

@allenporter
Copy link
Contributor

The two things that changed are:

Do you have multiple applications setup? Maybe re-setting up on the application credentials side? https://www.home-assistant.io/integrations/application_credentials/

@ZyberSE
Copy link

ZyberSE commented Jul 3, 2022

That's it, I removed those and it works now. Thank you.

@dominicusmento
Copy link

Do you have multiple applications setup? Maybe re-setting up on the application credentials side? https://www.home-assistant.io/integrations/application_credentials/

Helped me too. Removed both, restarted HA, and run setup again; browser asked for popup after which it 'stuck' again saying again that redirection uri not authorized.. -> restart HA once more hoping it will then ask for singlekey ID login and it's consent and it did..

@allenporter
Copy link
Contributor

allenporter commented Jul 18, 2022

Double check the oauth credentials redirect UI to point at the exact url specified (my home assistant etc not your actual instance)

@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants