Please add: VerifyOTP(string email, string token, EmailOtpType type = EmailOtpType.Signup)
BasBBakker opened this issue · 7 comments
BasBBakker commented
This is a great library! Thanks!
I had one request:
Currently you have implemented
Task<TSession?> VerifyOTP(string email, string token, EmailOtpType type = EmailOtpType.MagicLink);
Can you also add:
Task<TSession?> VerifyOTP(string email, string token, EmailOtpType type = EmailOtpType.Signup);
It would be great to use OTP to verify an email.
Thanks!
Bas
acupofjose commented
Can do!
BasBBakker commented
Thank you! I really appreciate the work you have done on this.
There are very few products like Supabase with a good C# library.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Joseph Schultz ***@***.***>
Sent: Monday, May 1, 2023 9:31:08 PM
To: supabase-community/gotrue-csharp ***@***.***>
Cc: Bas Bakker ***@***.***>; Author ***@***.***>
Subject: Re: [supabase-community/gotrue-csharp] Please add: VerifyOTP(string email, string token, EmailOtpType type = EmailOtpType.Signup) (Issue #49)
Can do!
—
Reply to this email directly, view it on GitHub<#49 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGAYO3RBU6BF6WH7AN4XKN3XEBPVZANCNFSM6AAAAAAXR5JTSM>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
acupofjose commented
@BasBBakker thanks - glad to hear you're finding it useful!
I'm a little confused on your request - the third parameter is just set as a default parameter, the signature already accepts EmailOtpType.Signup
as a third parameter?
So:
await client.VerifyOTP("test@email.com", "123123", EmailOtpType.Signup);
is already valid!
BasBBakker commented
It does not work.
Logging in through OTP (for a user where email has already been confirmed) works beautifully.
But for a newly signed up user, it does not work. It does not return an authenticated user, and in Supabase the “Waiting for verification” does not disappear.
Thanks for your help!
Bas
acupofjose commented
Available in 3.1.2 using SignInWithOtp
!
BasBBakker commented
Works beautifully!
Thanks!
From: Joseph Schultz ***@***.***>
Sent: Tuesday, May 2, 2023 10:25 PM
To: supabase-community/gotrue-csharp ***@***.***>
Cc: Bas Bakker ***@***.***>; Mention ***@***.***>
Subject: Re: [supabase-community/gotrue-csharp] Please add: VerifyOTP(string email, string token, EmailOtpType type = EmailOtpType.Signup) (Issue #49)
Available in 3.1.2 using SignInWithOtp!
—
Reply to this email directly, view it on GitHub<#49 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGAYO3V3MVYHHWTM3LO3AH3XEG6XRANCNFSM6AAAAAAXR5JTSM>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
BasBBakker commented
I try to update the password. I don’t want to use the reset link. If people have forgotten their password they can log in through an OTP.
I update the password through the following code
var attrs = new UserAttributes
{
Email = client.Auth.CurrentUser.Email,
Password = password,
};
var response = await client.Auth.Update(attrs);
When I run this, I get an error message
{"message":"No API key found in request","hint":"No `apikey` request header or url param was found."}
Would you like me to open an issue?
Thanks in advance for fixing it!
Bas
From: Joseph Schultz ***@***.***>
Sent: Tuesday, May 2, 2023 10:25 PM
To: supabase-community/gotrue-csharp ***@***.***>
Cc: Bas Bakker ***@***.***>; Mention ***@***.***>
Subject: Re: [supabase-community/gotrue-csharp] Please add: VerifyOTP(string email, string token, EmailOtpType type = EmailOtpType.Signup) (Issue #49)
Available in 3.1.2 using SignInWithOtp!
—
Reply to this email directly, view it on GitHub<#49 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGAYO3V3MVYHHWTM3LO3AH3XEG6XRANCNFSM6AAAAAAXR5JTSM>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>