Open MilesLitteral opened 1 month ago
I discovered that SignUp's var body = new Dictionary<string, object> { { "email", email }, { "password", password } };
is actually not writing to JSON correctly and is thus leading to error code 400 (malformed/bad request) responses. I wrote a new SignUp function using the UserAttributes class and will make a pull request as it does work correctly and creates users without error (ie: calling the function creates users on the Supabase dashboard and does serialize to json as the /signup endpoint desires.)
A PR is always welcome! Thanks @MilesLitteral
@MilesLitteral, I'm looking into your PR - I'm struggling to duplicate the malformed request issue you're seeing.
If it's a general issue, it should be present when testing in our CI against the latest released tag on the supabase/gotrue
repo. I did update the repo because it was using an old tag for testing - but I'm not seeing any issue when testing against the SignUp
method.
This makes me think it's a Unity issue - potentially a conflict between System.Text.Json
and Newtonsoft.Json
. Thoughts?
@MilesLitteral, I'm looking into your PR - I'm struggling to duplicate the malformed request issue you're seeing.
If it's a general issue, it should be present when testing in our CI against the latest released tag on the
supabase/gotrue
repo. I did update the repo because it was using an old tag for testing - but I'm not seeing any issue when testing against theSignUp
method.This makes me think it's a Unity issue - potentially a conflict between
System.Text.Json
andNewtonsoft.Json
. Thoughts?
That's possible, I was under the impression it could be a general error because this issue came up when calling sign up regardless on my system though it could be a separate issue, however this function definitely works in Unity out of the box as the request isn't malformed when sending a UserAttributes object
Bug report
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Note: Confirm you have new user sign up enabled
supabase.Auth.SignUp(<email>, <password>);
BadRequestException
:Expected behavior
Sign Up user acknowledged in dashboard
System information
Additional context
Add any other context about the problem here.