I'm attempting to create a WebApp with QRCode login just like WhatsApp when you login using your smartphone. I'm trying at ASP.NET C# side using SignalR, but it seems there's no support in B4a.
I could use Google Authenticator method, but I don't want to type the resulting code, I need the WebApp to autologin when the Android app detects the displayed QRCode.
Anyone can help me understanding how to accomplish this?
I am not familiar with JavaScript such as async/await so I can’t comment much. I have built something like WhatsApp login using QR Code but it is a B4J desktop app using timer.
What I understand is B4A app will scan the QR Code to get an URL with an encoded parameter then make a HTTP request using OkHttpUtils2 then WaitFor job complete. I don’t see it requires support for something else like SignalR. You just need a background service to refresh the web page after a period of time.
1. Display the QR-Code on the website. Content: a unique and long token (64 bytes Base64 encoded with a timestamp so that older tokens are void)
2. Scan the QR-Code in your app
3. Use OKHttpUtils and call a php script (easy) on your server or connect to a port using the token and other credentials to identify the user
4. Do other stuff