Skip to content

Commit

Permalink
Correctly flatten struct
Browse files Browse the repository at this point in the history
Fixes #15
  • Loading branch information
Proziam committed Jan 19, 2025
1 parent 7be1536 commit 8ab07f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ pub struct UserMetadata {
pub picture: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar_url: Option<String>,
#[serde(flatten)]
pub custom: HashMap<String, Value>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
Expand Down Expand Up @@ -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)]

This comment has been minimized.

Copy link
@sripwoud

sripwoud Jan 19, 2025

@Proziam

what about the captcha_token option?
Doesn't it needs to be nested in a gotrue_meta_security object?
https://github.com/supabase/auth/blob/a4c692f6cb1b8bf4c47ea012872af5ce93382fbf/openapi.yaml#L374-L375

I see there are also other possible options not handled yet (I don't use/need them personally, but eventually maybe someone else will?):

  • code_challenge
  • code_challenge_method

https://github.com/supabase/auth-js/blob/9748dd9ba0c4b97d2ea81f6fd5d9585ad0cfe839/src/GoTrueClient.ts#L452-L454
https://github.com/supabase/auth/blob/a4c692f6cb1b8bf4c47ea012872af5ce93382fbf/openapi.yaml#L343-L348

pub(crate) options: Option<SignUpWithPasswordOptions>,
}

Expand Down

0 comments on commit 8ab07f0

Please sign in to comment.