Skip to main content

rustauth_plugins/
lib.rs

1//! Official RustAuth plugin module surface.
2//!
3//! Plugin modules are ported against the Better Auth upstream reference where
4//! the behavior belongs on the server side, then shaped as idiomatic Rust APIs.
5
6pub mod access;
7pub mod additional_fields;
8pub mod admin;
9pub mod anonymous;
10pub mod api_key;
11pub mod bearer;
12pub mod captcha;
13pub mod custom_session;
14pub mod device_authorization;
15pub mod email_otp;
16pub mod generic_oauth;
17pub mod have_i_been_pwned;
18pub mod jwt;
19pub mod last_login_method;
20pub mod magic_link;
21pub mod multi_session;
22pub mod oauth_proxy;
23pub mod one_tap;
24pub mod one_time_token;
25pub mod open_api;
26pub mod organization;
27pub mod phone_number;
28pub mod prelude;
29pub mod siwe;
30pub mod two_factor;
31pub mod username;
32
33pub mod schema_plugins;
34
35pub use schema_plugins::{
36    configured_official_schema_plugins, is_official_schema_plugin, official_schema_plugin,
37    official_schema_plugin_ids, APP_CONFIGURED_SCHEMA_PLUGIN_IDS, NO_FIXED_SCHEMA_PLUGIN_IDS,
38};
39
40pub const PLUGIN_IDS: &[&str] = &[
41    access::UPSTREAM_PLUGIN_ID,
42    additional_fields::UPSTREAM_PLUGIN_ID,
43    admin::UPSTREAM_PLUGIN_ID,
44    anonymous::UPSTREAM_PLUGIN_ID,
45    api_key::UPSTREAM_PLUGIN_ID,
46    bearer::UPSTREAM_PLUGIN_ID,
47    captcha::UPSTREAM_PLUGIN_ID,
48    custom_session::UPSTREAM_PLUGIN_ID,
49    device_authorization::UPSTREAM_PLUGIN_ID,
50    email_otp::UPSTREAM_PLUGIN_ID,
51    generic_oauth::UPSTREAM_PLUGIN_ID,
52    have_i_been_pwned::UPSTREAM_PLUGIN_ID,
53    jwt::UPSTREAM_PLUGIN_ID,
54    last_login_method::UPSTREAM_PLUGIN_ID,
55    magic_link::UPSTREAM_PLUGIN_ID,
56    multi_session::UPSTREAM_PLUGIN_ID,
57    oauth_proxy::UPSTREAM_PLUGIN_ID,
58    one_tap::UPSTREAM_PLUGIN_ID,
59    one_time_token::UPSTREAM_PLUGIN_ID,
60    open_api::UPSTREAM_PLUGIN_ID,
61    organization::UPSTREAM_PLUGIN_ID,
62    phone_number::UPSTREAM_PLUGIN_ID,
63    siwe::UPSTREAM_PLUGIN_ID,
64    two_factor::UPSTREAM_PLUGIN_ID,
65    username::UPSTREAM_PLUGIN_ID,
66];
67
68pub const VERSION: &str = env!("CARGO_PKG_VERSION");