Login with QR Code

Overview#

Users can log in by scanning a QR code displayed on the web using their mobile device. The mobile app scans the QR code, authenticates the user, and establishes a secure session, allowing the web to log in instantly without entering credentials.

LogIn With QR code#

Users can log in by passing the scanned QR result using the method below.

Mirrorfly.loginWebChatViaQRCode(barcode: barcode,flyCallBack: (FlyResponse response) {
if (response.isSuccess) {
// QR code login was successful.
} else {
// Handle the failure of QR code login.
}
});
ArgumentTypeDescription
barcodeStringThe scanned QR code result used for web login.
flyCallbackFlyResponsecallback to observe the action status

Retrieve QR Code Login Details#

To retrieve the QR code login details, use the following method.

var webLoginDetails = await Mirrorfly.getWebLoginDetails();
List<WebLogin> list = webLoginFromJson(webLoginDetails);
ArgumentTypeDescription
webLoginDetailsList<WebLogin>List of web login details, including id, qrUniqueToken, browser name, OS name, and last login time.