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.

FlyCore.loginWebChatViaQRCode(QR_CODE_RESULT,(isSuccess, throwable, data)->{
if (isSuccess) {
// QR code login was successful.
} else {
// Handle the failure of QR code login.
}
});
ArgumentTypeDescription
QR_CODE_RESULTStringThe scanned QR code result used for web login.
CALLBACKFlyCallbackFlyCallback implemented as as lambda expression

Retrieve QR Code Login Details#

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

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

Logout All Web Sessions#

To log out of all web sessions, use the following method:

WebLoginDataManager.logOutWebSessions((isSuccess, throwable, data)->{
if (isSuccess) {
// Logout from the web session was successful.
} else {
// Handle the failure of logging out from the web session.
}
});
ArgumentTypeDescription
CALLBACKFlyCallbackFlyCallback implemented as as lambda expression

Note: When a QR code logged-in session is logged out, the event is observed through callbacks. For more information on handling web logout updates, refer to the callback details here.