New component with OAuth2 authentication

Hi all. I’m starting the development of a new component for Honeywell evohome thermostat, the new API requires OAuth2 authentication.
Is there a common “infrastructure” in HA for OAuth2 authentication?
If not, what’s the existing component with the best implementation to use as a reference?

Thanks.

1 Like

I was wondering the same thing a few months ago, but quickly became distracted with other things :slight_smile:

I’ll try to setup a github repo and share the component from the beginning. I have little Python knowledge and little time, so I’m hoping in other people’s contribution :grin:

I have the same question. Any help on how to develop a component calling a API using OAuth2 authentification would be appreciated

Did anybody find an answer to this? I am in the same boat.

I’ve implemented support by copying form the Spotify component, but you are right there should be a standardized way to do it…

1 Like

Better handled by upstream lib.

There are tons of example, you can check Nest.

Thanks guys, that was exactly what I was looking for.

Note that the Spotify code has moved to:

You could just use a reverse proxy like nginx or traefik and use the external auth server project to enforce oauth: