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

Provide the ability to set redirect when calling `Client.Instance.Auth.SendMagicLink` or `Client.Instance.Auth.SignIn` #20

Closed MisterJimson closed 2 years ago

MisterJimson commented 2 years ago

Feature request

Provide the ability to set redirect when calling Client.Instance.Auth.SendMagicLink or Client.Instance.Auth.SignIn

Other Supabase client libs include this and it would help for deep linking magic link emails to the application.

acupofjose commented 2 years ago

The SignUp method currently accepts SignUpOptions.RedirectTo but you’re right, we don’t have that for SendMagicLink And it should be added!

MisterJimson commented 2 years ago

May want to transfer the issue to gotrue-csharp, it doesn't allow me to.

Kieudung717 commented 2 years ago

Feature request

Provide the ability to set redirect when calling Client.Instance.Auth.SendMagicLink or Client.Instance.Auth.SignIn

Other Supabase client libs include this and it would help for deep linking magic link emails to the application.

acupofjose commented 2 years ago

This is available in >= supabase-csharp@0.3.1 and supabase-community/gotrue-csharp@2.3.5

var options = new Supabase.Gotrue.SignInOptions { 
  RedirectTo = "https://my-super-url.com" 
};
await Supabase.Client.Instance.Auth.SendMagicLink("michael@supabase.io", options);

And

var options = new Supabase.Gotrue.SignInOptions { 
  RedirectTo = "https://my-super-url.com" 
};
await Supabase.Client.Instance.Auth.SignIn("michael@supabase.io", options);