IndieAuth.rs
A simple implementation of IndieAuth in Rust.
Client
The client library is made for actix-web. This is the all you need:
#[actix_web::main]
async fn main() -> std::io::Result<()> {
use actix_identity::IdentityMiddleware;
use actix_session::{storage::CookieSessionStore, SessionMiddleware};
use indieauth_client::{get_service, AuthConfig};
let config = AuthConfig::new("localhost:8080".to_string());
let secret_key = actix_web::cookie::Key::generate();
actix_web::HttpServer::new(move || {
actix_web::App::new()
.wrap(IdentityMiddleware::default())
.wrap(SessionMiddleware::new(
CookieSessionStore::default(),
secret_key.clone(),
))
.service(index)
.service(get_service(&config))
})
.workers(1)
.bind("127.0.0.1:8080")?
.run()
.await
}
Try it out
git clone https://codeberg.org/jak2k/indieauth.rs.git
cd indieauth.rs
cd indieauth-client
cargo run localhost:8080
If you run it on localhost using http, you will need to change the URL in the addressbar to http manually.
FediAuth-Server
An IndieAuth provider that support logging in with a fediverse account.