Login with QR code

To Web Login#

Step 1: Call getSocketId method#

Call the getSocketId method. If the call is successful, proceed to the next step and pass the scanned QR code data to the handleQrCodeData method.

    WebLoginsManager.shared.getSocketId { isSuccess, message in
    if isSuccess {
    // Proceed to Step 2 with the scanned QR code data
    WebLoginsManager.shared.handleQrCodeData(qrCodeString: qrData) { [weak self] isSuccess, message in
    if isSuccess {
    // Web login is successful
    } else {
    // Handle failure
    }
    }
    } else {
    // Handle failure in getting Socket ID
    }
    }

    Step 2: Call handleQrCodeData method#

    Call the handleQrCodeData method with the scanned QR code string. If the method succeeds, the web login is considered successful.

      WebLoginsManager.shared.handleQrCodeData(qrCodeString: qrData) { [weak self] isSuccess, message in
      if isSuccess {
      // Web login is successful
      } else {
      // Handle failure
      }
      }
      ArgumentTypeDescription
      qrCodeStringStringscanned qr code data from web

      To Get Web Login Details#

      Call the following method to retrieve web login details:

        let webLogins: [WebLoginInfo?] = WebLoginsManager.shared.getWebLogins()
        Returns:#

        This method returns an array of [WebLoginInfo?]. To WebLoginInfo details click here., which contains the stored web login details.

        To log out of web sessions#

        To log out of web sessions, call the logoutWebSessions method from WebLoginsManager and pass the appropriate completion handler to handle the logout response.

          WebLoginsManager.shared.logoutWebSessions(completionHandler: completionHandler)

          Note: Weblogout events are observed through the WebLogoutDelegate. For more information on handling weblogout updates, see the delegate details here.