Skip to main content

Crate propel

Crate propel 

Source
Expand description

Axum middleware for Supabase Auth on Google Cloud Run.

§Quick start

[dependencies]
propel = "0.2"
use axum::{routing::get, middleware, Router};
use propel::{PropelState, PropelAuth};

async fn handler() -> &'static str { "ok" }

let state = PropelState::load().unwrap();
let app: Router = Router::new()
    .route("/api/protected", get(handler))
    .layer(middleware::from_fn_with_state(state.clone(), PropelAuth::verify))
    .with_state(state);

Re-exports§

pub use auth::PropelAuth;
pub use auth::SupabaseClaims;
pub use error::SdkError;
pub use state::PropelState;

Modules§

auth
error
state