/2fa_login

This is personal project for testing 2fa auth (TOTP and U2F)

Primary LanguageRust

LOGIN USER WITH 2FA PROJECT

This is just project for implementing a Two factor Authentification Systems. TOTP and FIDO2 Protocol.

HOW TO RUN THE DEVELOPMENT ENVIROMENT

There are three parts inside the project. Frontend (SvelteKit), Backend (Actix-Web), Caddyfile (Caddy web server).

The Caddy server is just used for having an https connection with a Domain for using authentification cookies with httpOnly.

If you don't have Caddy Server install please go the the Website Start page and install it.

Here are some steps to get start developing:

  1. Clone the entire repository.
git clone https://github.com/lescuer97/2fa_login.git
  1. From the root of the project. Go to the front end folder and make sure you have pnpm installed and install the dependencies for the frontend
cd front/
npm i -g pnpm
pnpm i
  1. Run de backend server

    1. You can run de backend server watching for files with this command:

      cargo watch -x 'run --bin rust-server'
      

    You need to have cargo-watch installed

    1. You can run with the standard cargo command

      cargo run
      
  2. Run the caddy server

sudo caddy run

You will also need to have Node and Rust enviroments installed in your system.