mekolowich / nikola-tesla-alexa

Nikola: An Alexa Skill (and Python intent handler) for Monitoring and Managing a Connected Tesla Automobile
MIT License
9 stars 5 forks source link

OAUTH #8

Closed TeslaCLT closed 7 years ago

TeslaCLT commented 7 years ago

The OAUTH token can be passed in (by Alexa or anyone else calling this) and that will prevent using TESLA_USERID and TESLA_PASSWORD. A locally stored environment variable called TESLA_TOKEN can also be used instead of passing in an OAUTH token.

A new environment variable called USE_TOKEN can be set to YES to switch over the instance to using OAUTH tokens (if available) versus USERID + PASSWORD. This is so those who are unfamiliar with OAUTH tokens and those who are to be able to use the same code base. Any value other than YES (even just Y) will use the USERID + PASSWORD process.