From c3d7e58448ca56560b5dfeb19a8030e75c28462f Mon Sep 17 00:00:00 2001 From: The_C1oud <50553458+dullkingsman@users.noreply.github.com> Date: Mon, 10 Oct 2022 00:05:44 +0300 Subject: [PATCH] Make `federated_id` and `email` optional Since `email` is optional if the provider is "phone" or a federated identity provider like Facebook and the same goes for `federated_id` with phone auth. Therefore, these fields should be optional. Valid authentication is failing because this deserialization is failing. --- src/api/user.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/user.rs b/src/api/user.rs index 8b81fd9..13e948d 100644 --- a/src/api/user.rs +++ b/src/api/user.rs @@ -160,8 +160,8 @@ pub struct UpdateUser { #[serde(rename_all = "camelCase")] pub struct ProviderUserInfo { pub provider_id: String, - pub federated_id: String, - pub email: String, + pub federated_id: Option, + pub email: Option, pub raw_id: String, }