Elegant, async-first, and Developer Experience (DX) focused authentication library. Easily integrate social logins across Axum, Actix, Leptos, and more.
cargo add rullst-connect
Copied!
Built for the modern Rust web ecosystem with a focus on simplicity and security.
Built entirely on top of tokio and reqwest for non-blocking, high-performance authentication flows.
All providers return a unified ConnectUser struct, making it easy to switch or support multiple providers.
Works seamlessly with your favorite frameworks: Axum, Actix, Leptos, Dioxus, or vanilla Rust.
Built-in OIDC Discovery, JWKS validation, automatic CSRF protection, and native PKCE support.
Out-of-the-box support for the most popular social login platforms.
Three simple steps to authenticate your users.
use rullst_connect::prelude::*;
// 1. Initialize the Provider
let github = GithubProvider::new(
"CLIENT_ID".to_string(),
"CLIENT_SECRET".to_string(),
"http://localhost:3000/auth/callback".to_string(),
);
// 2. Redirect the User
let url = github.redirect_url();
// Return this URL as a redirect to the user
// 3. Handle the Callback
let params = ExchangeParams { auth_code: code, ..Default::default() };
if let Ok(user) = github.get_user(params).await {
println!("Welcome, {}!", user.name);
println!("Email: {:?}", user.email);
}