Expand description
Official Stackure authentication SDK for Rust.
Provides four free async functions: [auth] (not yet — framework-specific),
verify, send_magic_link, and logout. No client struct, no
config type, no caller-tunable knobs.
Point at a non-production environment by setting STACKURE_BASE_URL
before the first call.
§Quick start
let result = stackure::verify("my-app-id", Some("session=abc"), Some(&["admin"])).await;
if result.authenticated {
println!("{:?}", result.user);
}§Errors
Every fallible function returns StackureError. Match on the variant or
call StackureError::code for a stable lowercase category string.
Re-exports§
pub use errors::StackureError;pub use types::MagicLinkResponse;pub use types::User;pub use types::VerifyError;pub use types::VerifyResult;
Modules§
- errors
- Stackure SDK error type.
- types
- Public types returned by the Stackure SDK.
- validation
- Input validation utilities for the Stackure SDK.
Functions§
- logout
- Revoke the session represented by the given cookies.
- send_
magic_ link - Send a passwordless sign-in email to a user.
- verify
- Check an incoming request’s authentication state without panicking.