Closed premier-boats closed 5 years ago
Hi and thanks for reporting,
it's true, the way to generate tokens changed on June 17th, now it's a base64 see here.
So let's say I can change the regexp with this: ^[a-zA-Z0-9]{32}$
Soon update the library with a new version.
Best regard
"-_=" are all legal characters for URL-encoded base64, as used here: https://github.com/blynkkk/blynk-server/blob/master/server/utils/src/main/java/cc/blynk/utils/TokenGeneratorUtil.java
The "=" (padding) character should never appear as the server is encoding exactly 24 bytes, which fits perfectly into 32 base64 digits.
See the base64 URL-safe table, here, for legal characters: https://tools.ietf.org/html/rfc4648#page-7
fix in release 1.0.0
When setting up a new flow on a new device, deploying the flow warns that "The workspace contains some nodes that are not properly configured:"
In the blynk-ws-client settings node, the auth token is highlighted in red.
If I ignore the warning on deploying the flow, the flow works as expected and the Blynk nodes connect successfully.
Current auth tokens include any alphanumeric character as well as some symbols (possibly the Base64 encoding alphabet?). The validation regexp only allows 32 a-fA-F0-9 characters.
I can't find specifics from Blynk on the auth token format. For validation it might be sufficient to require the field to be non-empty to avoid problems with future format changes.