rustauth_plugins/one_tap/
mod.rs1mod endpoint;
4mod options;
5mod response;
6
7pub use options::OneTapOptions;
8pub use options::OneTapOptionsBuilder;
9
10use rustauth_core::plugin::AuthPlugin;
11
12pub const UPSTREAM_PLUGIN_ID: &str = "one-tap";
13
14#[must_use]
15pub fn one_tap(options: OneTapOptions) -> AuthPlugin {
16 AuthPlugin::new(UPSTREAM_PLUGIN_ID)
17 .with_version(crate::VERSION)
18 .with_options(serde_json::to_value(&options).unwrap_or(serde_json::Value::Null))
19 .with_endpoint(endpoint::one_tap_callback_endpoint(options))
20}