-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify password for already signed in user does not seem to work #58
Comments
Can you show me how you're initializing the client in your code? |
I use the Blazor Webassembly example in the C# supabase library: The client is then initialized as per below: public class AuthService
} |
Hm. That's strange. It acts as though your client hasn't been initialized with a |
Yes, so far no other problems!
(login, logout, login with OTP, login with password, fetching data, all works fine).
Sorry for the inconvenience!
From: Joseph Schultz ***@***.***>
Sent: Saturday, May 6, 2023 11:04 PM
To: supabase-community/gotrue-csharp ***@***.***>
Cc: Bas Bakker ***@***.***>; Assign ***@***.***>
Subject: Re: [supabase-community/gotrue-csharp] Modify password for already signed in user does not seem to work (Issue #58)
Hm. That's strange. It acts as though your client hasn't been initialized with a supabase_public_key... everything else works as normal?
—
Reply to this email directly, view it on GitHub<#58 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGAYO3U57CHY7JER3WCG463XE4GIJANCNFSM6AAAAAAXXM722Q>.
You are receiving this because you were assigned.Message ID: ***@***.******@***.***>>
|
Okay. I’m thinking #57 ought to address this when it’s merged! Thanks for your patience! |
It sends an API key and a bearer token. In the network console I get the message: Is this because in the payload the email_change_token is null? {email: "x@x.us", email_change_token: null, password: "xxx", phone: null, data: {}} |
Putting in the email_change_token in the payload gives the same error message. |
Okay: some more data for you! You are correct, we are missing the The following currently works: var email = $"{RandomString(12)}@supabase.io";
var newPassword = "IAmANewSecretPassword!@#";
await client.SignUp(email, "testing123!@#12");
await client.Update(new UserAttributes()
{
Password = newPassword
});
await client.SignOut();
var user = await client.SignIn(email, newPassword); The above functions provided the following is true:
Adding the The below functions provided the following is true:
var email = $"email@example.com";
var initialPassword = ""testing123!@#12";
await client.SignUp(email, initialPassword);
// User has confirmed email
await client.SignIn(email, initialPassword);
// User is signed in
await client.Reauthenticate();
// User receives email with a nonce
var newPassword = "IAmANewSecretPassword!@#";
await client.Update(new UserAttributes()
{
Password = newPassword,
Nonce = RECEIVED_NONCE,
}); The above will be available in |
Works perfect. Thanks a lot! |
Bug report
Describe the bug
When I try to update the password of an already signed in User, I get an error and this message in the browser:
{"message":"No API key found in request","hint":"No
apikey
request header or url param was found."}This is the code I use:
Thanks in advance!
The text was updated successfully, but these errors were encountered: