#oauth #user #account #password #template #axum

userp

Userp is a user account system inspired by Next Auth, with OAuth, password and email support, a ready-made Axum router with Askama templates, and more on the way!

5 releases

new 0.0.4 Oct 27, 2024
0.0.3 Oct 22, 2024
0.0.2 Oct 19, 2024
0.0.1 Oct 19, 2024
0.0.0 Oct 18, 2024

#180 in Authentication

Download history 257/week @ 2024-10-13 279/week @ 2024-10-20

536 downloads per month

ISC license

165KB
4.5K SLoC

Userp

Work in progress

Warning: This crate is heavily WIP! I'm holding off on doc-comments until I've worked out the module hierarchy and basic API to my satisfaction.

Summary

This crate provides a high-level user, authentication and session handling system for Axum, and likely Actix later on. The idea is to use it as a base for something like Next Auth but for Leptos, being easy to set up while heavy on features, with including batteris a higher approach than full customizability.

If you need something truly custom you might want to look at the awesome axum-login or oauth2 crates, but if you just want...

  1. Users to be able to Log In
  2. Reset their Passwords with their verified Email
  3. Link their social accounts
  4. Manage their multiple Sessions

... Then this might be something for you!

Screenshots

Before you ask: design PRs are most welcome 😅

A screenshot of the included sign-up screen
A screenshot of the included user account management screen

Features

  • Login types
    • Username / Password
    • Email magic link
    • Social logins (OAuth)
  • Emails
    • Validation
    • Password reset
  • Oauth
    • Easily extendable with custom providers
    • Ergonomicly implement user info fetching procedure
    • Optional split callback paths
  • Batteries included
    • Askama based templates provide basic login/signup/account pages
    • Growing list of built-in social providers
    • Multiple sessions

Todo

  • Granular feature-controlled templates
  • Replacable templates (by typed Fns returning impl IntoResponse)
  • Webauthn
  • MFA
  • Doc-comments
  • Tests
  • ???
  • Publish!

Dependencies

~6–40MB
~635K SLoC