Anyone have a clever method of doing dynamic auth on RPi?

Hey All-

I know I can hack a way to make this work and there are a million ways to accomplish this, but I have a scenario where I have multiple RPi+Node.js sensor boxes running the same exact code with different auth tokens. If (When) one of these boxes craps out, I would love a simple way to grab a new sensor box turn it on, and assign it the auth token of the broken box and/or power on the new box, create a new blynk auth token in the app and assign it to the new box via some extremely simple (read: idiot-friendly) mechanism.

I haven’t completely thought out all of the nuances, but my initial thoughts:

  • a simple web page that grabs user input and I have the user pop in a qr code with the token embedded or just a text string ( I believe wifi-manager is/was doing something similar to this)

-I’ve also thought about having some sort of ‘default’ token that all of my devices are pre-programmed with and some kind of dashboard that would be able to re-assign auth tokens using a db.

Anyone have an amazingly simple and clever solution?

What you’ve stated is the simplest and most elegant. You could just use a web URL post without an actual page. Look up the restful API calls of Blynk which are similar.

This assumes the box is reachable on IP though either within the LAN or from the internet using port forwards.