From 8ab07f0d1ce5da397ea734c09bf187aa25e526cd Mon Sep 17 00:00:00 2001 From: Eric Biggs Date: Sat, 18 Jan 2025 21:53:00 -0500 Subject: [PATCH] Correctly flatten struct Fixes #15 --- src/models.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/models.rs b/src/models.rs index 47e0414..72279f6 100644 --- a/src/models.rs +++ b/src/models.rs @@ -92,6 +92,8 @@ pub struct UserMetadata { pub picture: Option, #[serde(skip_serializing_if = "Option::is_none")] pub avatar_url: Option, + #[serde(flatten)] + pub custom: HashMap, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] @@ -173,6 +175,7 @@ pub(crate) struct LoginWithPhoneAndPasswordPayload<'a> { pub(crate) struct SignUpWithEmailAndPasswordPayload<'a> { pub(crate) email: &'a str, pub(crate) password: &'a str, + #[serde(flatten)] pub(crate) options: Option, }