supabase-community / supabase-csharp

A C# Client library for Supabase
https://github.com/supabase-community/supabase-csharp/wiki
MIT License
502 stars 51 forks source link

Mapped property UserMetadata for User model #16

Closed fplaras closed 2 years ago

fplaras commented 2 years ago

Hi, it was not clear to me that the User model property named UserMetadata is mapped to data for Supabase usage. One example that created my confusion is when I would call GetUserById() method where that property is returned and it is named userMetadata. I was able to identify the correct mapping for Supabase usage by inspecting the SignUpWithEmail() where the object metadata is assigned to "data" exactly how it is labeled on the js library. The usage of these values under the authentication templates would be {{ .Data.FullName }} for anyone looking to use them this worked for me. I also noticed that there are 2 properties for options one is data and the other is redirectTo. The current signup methods only include data.

acupofjose commented 2 years ago

@fplaras thanks for all the feedback! I'll address these shortly. A Merry Christmas to you friend!

acupofjose commented 2 years ago

The signature now has a specific class for it, SignUpOptions that has both of these options available with clarified comments.

Available in supabase-csharp@0.2.11