IoT Authentication Without a Webview (Android Things)


Is there a way to use the Android SDK without a webview/webpage to authenticate? I was hoping there was a way to have the user authenticate online and get their pin, then enter it via a decoder or something with a basic display on an Android Things device.



Right now I’m figuring I’d need a companion app to get the token and send it over bluetooth to the device, but hoping there’s a way to do this without needing the app.


I don’t think so, because the user should be presented with the permissions access request that they explicitly grant as part of the authentication flow.


Yeah, I figured there may be a way to authenticate with a web browser (from a computer or a phone), get the pin, and then enter that on their IoT device for authentication to get information back from Nest devices. Guess not currently though. Would be a nice feature to see added.


Have you looked into the pin-based authorization? It sounds like this what you are looking for.

Pin-based authorization is typically used on devices that can’t open a browser or web-view. As you’ve mentioned, the user would go to a website to initiate the authorization flow, ultimately getting a pin, that is then entered into your device to complete the authorization.


Yeah that’s pretty much what I’m looking for, I just didn’t see it baked into the Android SDK yet, and was trying to avoid writing my own wrapper. I’ll probably just go over it this week and make something work though. Thanks!