1
0
mirror of https://github.com/actix/examples synced 2024-11-30 17:14:35 +01:00
examples/auth/simple-auth-server
2024-07-20 00:26:54 +01:00
..
migrations restructure folders 2022-02-18 02:01:48 +00:00
src chore: use fork of sparkpost 2024-07-07 03:26:40 +01:00
static restructure folders 2022-02-18 02:01:48 +00:00
Cargo.toml chore: use fork of sparkpost 2024-07-07 03:26:40 +01:00
diesel.toml restructure folders 2022-02-18 02:01:48 +00:00
README.md ci: fix diesel example 2024-07-20 00:26:54 +01:00

Auth Web Microservice with Rust using Actix Web

Flow of the event would look like this:

  • Registers with email address ➡ Receive an 📨 with a link to verify
  • Follow the link ➡ register with same email and a password
  • Login with email and password ➡ Get verified and receive auth cookie

Available Routes

Crates Used

  • actix-web // Actix Web is a simple, pragmatic and extremely fast web framework for Rust.
  • rust-argon2 // crate for hashing passwords using the cryptographically-secure Argon2 hashing algorithm.
  • chrono // Date and time library for Rust.
  • diesel // A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL.
  • dotenv // A dotenv implementation for Rust.
  • derive_more // Convenience macros to derive traits easily
  • env_logger // A logging implementation for log which is configured via an environment variable.
  • futures // An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces.
  • lazy_static // A macro for declaring lazily evaluated statics.
  • r2d2 // A generic connection pool.
  • serde // A generic serialization/deserialization framework.
  • serde_json // A JSON serialization file format.
  • sparklepost // Rust bindings for Sparkpost email API.
  • uuid // A library to generate and parse UUIDs.

Read the full tutorial series on gill.net.in

Dependencies

On Ubuntu 19.10:

sudo apt install libclang-dev libpq-dev