KraigM / HomeBridgeController

Provides a simplified UI for controlling your HomeBridge
87 stars 7 forks source link

Add OAuth process for plugin setup #28

Closed KraigM closed 8 years ago

KraigM commented 8 years ago

We need a way to setup the app to collect OAuth tokens (i.e. have built in client/secret and handling for redirects). That way plugins can use API's that require developer accounts (like Nest) without making users create there own.

KraigM commented 8 years ago

I will probably use Nest as a guinea pig plugin at first.

Jo3ytjuh commented 8 years ago

Great thanks !!

Jo3ytjuh commented 8 years ago

This provides an Gui ?? What does it ?? What can i setup using this ?.. And are the any Cons by using it ?? Are my credentials still safe ?..

KraigM commented 8 years ago

The app DOES NOT support the Nest setup (yet). That app does not send your config anywhere but to the homebridge that it came from. It stores it locally on you computer (just for revert purposes in case you mess up your config and want to go back).

Its still very much a work in progress and it won't directly help you solve this current prob, but its coming soon.

KraigM commented 8 years ago

@Jo3ytjuh Sorry I may have miss understood you. Once implemented, yes your credentials will be safe. The whole concept of OAuth is that the developer sends you to a special page on Nest's website (that Nest has full control of). When you log in on Nest's website and approve the developer having access, the website will send the developer's app what he needs to connect. This is the same process when you did the new API setup, but you had first create a dev account and then you had to do all the "follow the links" and copying manually. With this you wouldn't need a dev account and it would just be an automated process to setup.

Its the same technique used in websites/apps that have a "Login with Facebook" or "Login with Google"

KraigM commented 8 years ago

Completed and will be in the next release (0.5.0)