diff --git a/Cargo.lock b/Cargo.lock
index c766bfa..2a1d4fa 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1491,6 +1491,16 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+[[package]]
+name = "erased-serde"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d"
+dependencies = [
+ "serde",
+ "typeid",
+]
+
[[package]]
name = "errno"
version = "0.3.10"
@@ -4362,6 +4372,7 @@ dependencies = [
"serde",
"serde_json",
"thiserror 2.0.9",
+ "typetag",
]
[[package]]
@@ -4496,12 +4507,14 @@ name = "shield-memory"
version = "0.0.1"
dependencies = [
"async-trait",
+ "serde",
"shield",
"shield-credentials",
"shield-email",
"shield-oauth",
"shield-oidc",
"shield-webauthn",
+ "typetag",
"uuid",
]
@@ -4540,6 +4553,7 @@ dependencies = [
"shield-oauth",
"shield-oidc",
"shield-webauthn",
+ "typetag",
]
[[package]]
@@ -5455,12 +5469,42 @@ dependencies = [
"syn 2.0.90",
]
+[[package]]
+name = "typeid"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e"
+
[[package]]
name = "typenum"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+[[package]]
+name = "typetag"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "044fc3365ddd307c297fe0fe7b2e70588cdab4d0f62dc52055ca0d11b174cf0e"
+dependencies = [
+ "erased-serde",
+ "inventory",
+ "once_cell",
+ "serde",
+ "typetag-impl",
+]
+
+[[package]]
+name = "typetag-impl"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9d30226ac9cbd2d1ff775f74e8febdab985dab14fb14aa2582c29a92d5555dc"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
[[package]]
name = "unicase"
version = "2.8.0"
@@ -5742,7 +5786,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
- "windows-sys 0.48.0",
+ "windows-sys 0.59.0",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index b76939a..5e3db69 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,5 +35,6 @@ tokio = "1.42.0"
tower-layer = "0.3.3"
tower-service = "0.3.3"
tower-sessions = "0.13.0"
+typetag = "0.2.19"
uuid = "1.11.0"
wasm-bindgen = "0.2.97"
diff --git a/examples/leptos-actix/src/app.rs b/examples/leptos-actix/src/app.rs
index de5fecd..2919c7c 100644
--- a/examples/leptos-actix/src/app.rs
+++ b/examples/leptos-actix/src/app.rs
@@ -1,10 +1,12 @@
use leptos::prelude::*;
use leptos_meta::{provide_meta_context, MetaTags, Title};
use leptos_router::{
- components::{Route, Router, Routes, A},
+ components::{Route, Router, Routes},
path,
};
-use shield_leptos::routes::SignIn;
+use shield_leptos::routes::{SignIn, SignOut};
+
+use crate::home::HomePage;
pub fn shell(options: LeptosOptions) -> impl IntoView {
view! {
@@ -34,21 +36,12 @@ pub fn App() -> impl IntoView {
-
+
+
}
}
-
-#[component]
-fn HomePage() -> impl IntoView {
- view! {
-
"Shield Leptos Actix Example"
-
-
-
- }
-}
diff --git a/examples/leptos-actix/src/home.rs b/examples/leptos-actix/src/home.rs
new file mode 100644
index 0000000..76a7216
--- /dev/null
+++ b/examples/leptos-actix/src/home.rs
@@ -0,0 +1,40 @@
+use std::sync::Arc;
+
+use leptos::{either::Either, prelude::*};
+use leptos_router::components::A;
+
+#[server]
+pub async fn user() -> Result