qr code

  • fouadtarabolsi-1327979910706499665

    FouadTarabolsi

    27 days ago

    hi,
    hello all, any idea how implements the following workflow? :


    - I open a page on a laptop
    - I get unique QR code
    - I scan it with my mobile
    - in the mobile I login
    -once I login the original screen with the barcode will automatically detect i successfully authenticated and give me my content.

    I assume as beginning that QR code page will be considered as an authentication page, also the value of the QR code will be unique for to identify the session .. or there are better and secure ways.
  • fouadtarabolsi-1331987031362113558

    FouadTarabolsi

    16 days ago

    hi, i was away for a while. any idea how this can be achvied ?
  • needtheanswers-1332265398166622263

    needtheanswers

    15 days ago

    Hi @FouadTarabolsi maybe you could do it like this 1) Create qr code on pageload/button click etc. You can use a library for that. The value/URL of the QR Code is something like a magic link with a auth token 2) When you scan the qr code it reads the auth token and fires an event (maybe something simple like a boolean value that is changing or just store the authtoken in the db) that would then go to your database 3) I don´t really know how to go about automatically detecting the authentifcation apart from using realtime features
  • Also do you mean mobile app or just a mobile webpage in the browser?
  • needtheanswers-1332265969502126090

    needtheanswers

    15 days ago

    I believe the workflow is the same as setting up a magic link login with the difference that the qr code contains the auth token
  • I think there is even a package that has a qr code creator but as mentioned before you could also do it yourself using a js library
  • needtheanswers-1332266800573841441

    needtheanswers

    15 days ago

    I did something very similar, I also store a token in the url I use to create qr codes
  • needtheanswers-1332267414007840769

    needtheanswers

    15 days ago

    You can set the value of your qr code to look like this for example: Https://yoursite.toddle.site/verify?token=YOURAUTHTOKEN
  • needtheanswers-1332270736038957100

    needtheanswers

    15 days ago

    Or maybe could build something like a loop on the original page to refetch the api data or change attribute to make use of autofetch every second for a timeframe of 5mins or so to check if a field in your db contains the authtoken or the boolean is true etc. I would definitely use realtime for this but this is just a possible alternative.

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.