Coder Social home page Coder Social logo

qr-authentication's Introduction

QR Auth Login

Description:

Authentication via QR code inspired on WhatsApp Web QR Login.

How to run:

If mock data is needed, use the addUser.sql file on doc folder

Backend Standalone

  1. Go to the root folder
  2. Execute gradlew build
  3. Execute gradlew bootRun
  4. All backend endpoints have /api/ prefix

Frontend Standalone

  1. Go to frontend folder/package
  2. Execute yarn install or npm install
  3. Execute yarn start or npm start

Backend with React:

Keep in mind that there will not be hot reload, because the backend uses the Vite compiled version of the React App

  1. Go to the root folder
  2. Execute gradlew build
  3. Execute gradlew bootRun

Made with:

  • Gradle 7.5.1
  • SpringBoot 5
  • React + TS + Vite
  • WebSockets

How it works?

  • Normal Flow Auth Normal Flow

  • QR Scan code Timeout TimeOut Flow

TODO:

BackEnd:

  1. Enable WS Connection for Spring
  2. Create Key-Value Store for Browser ID
  3. Define topics for ws messages
  4. Send Browser ID via WS
  5. Endpoint for managing mobile user confirmation
  6. Send Auth Token via WS
  7. Role management
  8. Secure endpoints with authentication and authorization

Frontend:

  1. Backend HTTP Request
  2. Backend WS Request
  3. Render QR Code from ByteArray
  4. Scan QR Code from browser
  5. Secure views with authentication and authorization

Cool Stuff:

  1. Migrate from useEffect hook to React Query
  2. Migrate from Bootstrap & React-Bootstrap to TailWind CSS

Special thanks to:

  1. Hayageek for the explanation

qr-authentication's People

Contributors

martingalvancastro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.