Authenticating & Authorizing a Tessel device with Auth0
It finally arrived and were able to write our first program: get a token from Auth0 and call an API.
This example is straight-forward:
- We call the
Resource Ownerendpoint on Auth0 with device credentials
- Get a token back
- We use the token to call an API
Noteworthy highlights of the code:
- This is 99% compatible with node (the only device specific module.is
tesselthat we only use to make sure all SSL calls happen with adequate time references.
requestfunction, is a simple wrapper on
httpmodule functions. The
requestmodule doesn't currently work in Tessel.
Resource Owner endpoint requires credentials (such as username/password), so the backend user store connected to Auth0 needs to support this (like a Database connection or Active Directory).
tessel updateto make sure you install the latest firmware with SSL support.
- You will obviously need connection to the web. You can setup WiFi with the
Tessel is awesome. We see a lot of potential. This sample shows how easy it is to connect it with Auth0.