Rust Auth Libraries

NameProduction ReadyUsageTypeAsync supportNegativesRemarkmaintenanceGitURLCrates URLURL
CookieYes- Creating a custom session and cookies based auth
- Saving JWT in encrypted cookies
- tracking users
Helper library for AuthenticationNo- only a helper library- lot of users
- support for parser and creating cookies
Actively maintainedhttps://github.com/SergioBenitez/cookie-rshttps://crates.io/crates/cookiehttps://docs.rs/cookie/0.14.1
oauth2Yes- support for obtain token oAuth
- support multiple https request clients
- reqwest
- curl
- custom
- Any Oauth provider which supports oAuth2 is supported
oauth supportYes- No support for verifying obtained token- full implementation of oAuth2Actively maintainedhttps://github.com/ramosbugs/oauth2-rshttps://crates.io/crates/oauth2https://docs.rs/oauth2/4.0.0-alpha.1/oauth2/index.html
oauth-clientNo (state validation is missing)- oAuth supportoauth supportNo- No support for verifying obtained token
- Not actively maintained
unmaintainedhttps://github.com/gifnksm/oauth-client-rshttps://crates.io/crates/oauth-clienthttps://docs.rs/oauth-client/0.4.0/oauth_client/index.html
oauth-client-asyncNo (state validation is missing)- async version of oauth-clientoauth supportYes- Not actively maintained
- Not that many users
- No support for verifying obtained token
unmaintainedhttps://github.com/gifnksm/oauth-client-rshttps://crates.io/crates/oauth-client-async/0.4.0https://docs.rs/oauth-client-async/0.4.0
oxide-authNo (frequently changing api)- library for building server based on oAuth
- support for various framework
- oxide-auth-actix
- oxide-auth-iron
- oxide-auth-rocket
- oxide-auth-rouille
oAuth server libraryYes- Not stable APIActively maintainedhttps://github.com/HeroicKatora/oxide-auth.githttps://crates.io/crates/oxide-authhttps://docs.rs/oxide-auth/0.4.5
inth-oauth2No (no longer maintained)- An oAuth client server
- support for google, github,imgur out of box
- pluggable interface with community support for slack and other provider
oAuth server libraryYes- Not mainatedunmaintainedhttps://github.com/programble/inth-oauth2https://crates.io/crates/inth-oauth2https://docs.rs/inth-oauth2/0.16.0
yup-oauth2Yes- oAuth for Google services like gmail, gcp etc.
- Support for token caching
oAuth helper libraryYes- No out of box auth provider support- support for :
- installed application
- Service account
- used by google-api-rs
Actively maintainedhttps://github.com/dermesser/yup-oauth2https://crates.io/crates/yup-oauth2https://docs.rs/yup-oauth2/4.1.2
frank_jwtNo (some important validation missing)- JWT creation
- JWT validation
- Support both symateric and asymateric alog
JWT helper libraryNo- no support for fetching keys from jwks- support for alot of algorithmsActively maintainedhttps://github.com/GildedHonour/frank_jwthttps://crates.io/crates/frank_jwthttps://github.com/GildedHonour/frank_jwt
jsonwebtokenYes- JWT creation
- JWT validation
- Support both symateric and asymateric alog
Jwt helper libraryNo- No support for fetching keys from jwks- great community support and used by thousands of porjects and cratesActively maintainedhttps://github.com/Keats/jsonwebtokenhttps://crates.io/crates/jsonwebtokenhttps://docs.rs/jsonwebtoken/7.2.0
otpauthYes- Otp creation and validationOtp auth libraryNo- no support for secret generation- support both :
- topt
- htop
passively maintainedhttps://github.com/messense/otpauth-rshttps://crates.io/crates/otpauthhttps://messense.github.io/otpauth-rs
boringauthNo- otp creation and validationOtp auth libraryNo- highly configurable
- support for pasword
- support both:
- topt
- htop
maintainedhttps://github.com/ThinkAlexandria/BoringAuth.githttps://crates.io/crates/boringauthhttps://docs.rs/boringauth/0.9.0
asapYes- ASAP Tokens(JWT with custom claims)ASAP Auth libraryNo- No support for JWKS- super fast
- supported by atlassian
https://bitbucket.org/atlassianlabs/rust-asap/https://crates.io/crates/asaphttps://docs.rs/asap/0.9.0
jwks-clientYes- JWT validation using JWKSJWT auth middlewareYes- works only for rocket web framework- uses JWKSActively maintainedhttps://github.com/jfbilodeau/jwks-clienthttps://crates.io/crates/jwks-clienthttps://github.com/jfbilodeau/jwks-client
digestYes