Base solution for your next web application
Open Closed

Login with QR code #9584


User avatar
0
ashvinu created
  • What is your product version? 8.1.0
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .net core

Hi, do you have any documentation regarding login using QR code instead of username and passwors?

Thanks and Regards


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi @ashvinu

    Do you mean scan the QR code though phone? Please explain you case in detail.

  • User Avatar
    0
    ashvinu created

    Hello,

    something like the below:

    A user can login using their username and password OR using QR code scanned by a mobile app (developed by us).

    Regards

  • User Avatar
    0
    zony created
    Support Team

    You can generate QR codes based on the QR Code library. The specific implementation process is as follows:

    1. The front end requests the QR code to log in.
    2. The server generates a random GUID.
    3. Put the GUID as the Key in Redis and set the expiration time.
    4. Generate a QR code based on the GUID and display it on the login page.
    5. The login page requests API-1 every second, passing the GUID.
    6. If the login has been authorized, the Access Token will be returned. If there is no authorization or the timeout interface will return an error message.
    7. APP requests API-2 (authentication required), carrying GUID and UserId.
    8. If the request is valid, set the cache entry value corresponding to the GUID to Access Token.
    9. The front end detects that API-1 returns an Access Token, indicating that the login is successful.