Example: OAuth to SmartThings with Node.js

I’ve been working on a web service that interfaces a user with their SmartThings installation and thought I’d share the guts of the authentication process. I’ve boiled it down to a single file using Express.js.

The program auths the user, gets the installation URL, and dumps a JSON representation of all things.
The README on github has a decent explanation.

github.com/tbeseda/smartthings-auth-example

As always, contributions and suggestions welcome.
Hope it helps any other Node developer trying to get over the authentication hump.

5 Likes