1
0
mirror of https://github.com/actix/examples synced 2024-11-30 09:12:54 +01:00
examples/simple-auth-server
yjh 89d2e4e3f7
fix typo and update some deps (#390)
* chore: fix typo for `run-in-thread`

* chore: update some deps for examples
2020-12-14 11:30:06 +00:00
..
migrations Update to new actix 1.0 api, drop actix-rt (#158) 2019-07-18 17:55:14 +06:00
src Use rust-argon2 instead of less-maintained argonautica (#389) 2020-12-02 12:29:03 +09:00
static simple-auth-server added to examples (#65) 2018-12-09 18:55:36 +03:00
Cargo.toml fix typo and update some deps (#390) 2020-12-14 11:30:06 +00:00
diesel.toml simple-auth-server added to examples (#65) 2018-12-09 18:55:36 +03:00
README.md Use rust-argon2 instead of less-maintained argonautica (#389) 2020-12-02 12:29:03 +09:00

Auth Web Microservice with rust using Actix-Web 1.0

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
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 tarits 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.
  • serde_derive // Macros 1.1 implementation of #[derive(Serialize, Deserialize)].
  • sparkpost // Rust bindings for sparkpost email api v1.
  • 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