Skip to main content

aurelin_fortify/
lib.rs

1//! Headless authentication workflows translated from Laravel Fortify.
2//!
3//! Applications provide user persistence and starter views through the action
4//! contracts in this crate. Framework primitives remain in `aurelin-framework`.
5//!
6//! No features are enabled by default. Enable `two-factor-authentication` for
7//! TOTP, recovery codes and their routes, or `passkeys` for the independent
8//! `aurelin-passkeys` package and its Fortify routes. Feature-specific backend
9//! methods and frontend fields exist only when that capability is enabled.
10
11#[cfg(feature = "passkeys")]
12pub use aurelin_passkeys as passkeys;
13
14mod actions;
15pub mod axum;
16mod email_verification;
17mod email_verification_rate_limiter;
18mod login_rate_limiter;
19#[cfg(feature = "passkeys")]
20mod passkey_rate_limiter;
21mod password_reset;
22#[cfg(feature = "two-factor-authentication")]
23mod two_factor_authentication;
24#[cfg(feature = "two-factor-authentication")]
25mod two_factor_rate_limiter;
26
27pub use actions::{CreatesNewUsers, RegistrationInput, ResetPasswordInput, ResetsUserPasswords};
28pub use email_verification::{EmailVerification, EmailVerificationError, EmailVerificationRequest};
29pub use email_verification_rate_limiter::{EMAIL_VERIFICATION_ATTEMPTS_PER_MINUTE, EmailVerificationRateLimiter};
30pub use login_rate_limiter::{LOGIN_ATTEMPTS_PER_MINUTE, LoginRateLimiter};
31#[cfg(feature = "passkeys")]
32pub use passkey_rate_limiter::{PASSKEY_ATTEMPTS_PER_MINUTE, PasskeyRateLimiter};
33pub use password_reset::{ResetPasswords, ResetPasswordsError};
34#[cfg(feature = "two-factor-authentication")]
35pub use two_factor_authentication::{
36    TwoFactorAuthentication, TwoFactorChallenge, TwoFactorChallengeOutcome, TwoFactorError, TwoFactorSetup,
37    TwoFactorState,
38};
39#[cfg(feature = "two-factor-authentication")]
40pub use two_factor_rate_limiter::{TWO_FACTOR_ATTEMPTS_PER_MINUTE, TwoFactorRateLimiter};