I would like to write a simple application that will prompt a QR code image for the configured WiFi networks.
I need your advices to choose the language that I'll use.
If I'm correct, there is lua, ucode and js languages available to create an application for OpenWrt ?
I think about creating the application in .js format but I'm a bit concerned about the security aspect.
The js and the picture file should always stay on the router side and when disconnecting from Luci, there should be no way to get those js or QR code picture file from the computer(cache or anywhere else) without connecting back to Luci.
Could js be ok for those security aspects or should I select another language ?
lua is on its way out, don't introduce new lua dependencies if you can help it (and in this case it's just a little uci parsing in POSIX shell and feeding that to qrencode). iirc the travelmate package has similar features, so there should be working example code.
Just a thought, when your users see the qrcode they can take a picture, so this is only security against people you did not already share the credentials with, unless you rapidly change the password.
I've made a script doing this for my personal usage a view years ago. Basically you can use this script just appending the qrcode to any (luci) html file. Not quite elegant. You just have to write sth. calling the script after changing wifi settings. Sysauth.htm is not there anymore. I've just tested it with luci_file="/tmp/wifi.html" setup. It is still working.
For one time use there are better things nowdays available:
P. S. I have no clue anymore if I adopted anything from anywhere. But I guess I've looked into lua/luci code to get a clue. What I know is it took me a while to adjust the qrcode output. So I do not claim anything here to be "my" code.