howartp wrote:howartp wrote:Hi both.
Until Indigo brings out OAuth support, i'm not aware we can integrate plugins with any OAuth services so there's nothing I can do about this at the moment.
Peter
@Matt @Jay
Am I correct in this general belief, ie we can't integrate with OAuth without Indigo doing something or me hosting a web endpoint somewhere that takes users credentials?
That's actually a complex question. OAuth has two sides: the client side and the server side. One OAuth client flow (a client, in this case the plugin asks a service to authenticate, in this case Tesla, which then would provide tokens back via HTTP redirects to use with their API) is tricky because Indigo Plugins can't do the necessary redirection like a web-based client can. I'm a bit surprised that Tesla doesn't allow you to generate tokens from their UI that can be used with their API in circumstances where this is the case because the standard flow is heavily dependent on several HTTP redirects. This is something that we want to look at in the future but it's not part of the work we're doing for the next feature release.
What we are implementing for the next feature release is the OAuth server side, to support integration FROM other services like Alexa and Google Home using customers Indigo Accounts to authenticate access to their Indigo Server. Users will also be able to generate tokens for use with the REST API for services that don't/can't do the http redirect dance required for that kind of authentication. But this is the server side OAuth implementation, not a client side implementation.