Hi all! I was wondering whether the feature to int...
# help
l
Hi all! I was wondering whether the feature to intercept a magic link has been released yet - mentioned here: https://github.com/supabase/supabase/discussions/2331 And if so, how I can use it. I looked on the blog but couldn't find it mentioned.
a
@User
search for Generate Confirmation Links
a
l
Whoa awesome, thanks so much!
Very excited to use this - will make life much much easier
Just started trying to use this, but I'm struggling. Getting the following response:
{"data":null,"error":{"message":"Could not read body: json: cannot unmarshal object into Go struct field GenerateLinkParams.type of type string","status":400}}
Code I'm running (with supabaseAdmin which has all permissions):
Copy code
export const getMagicLink = async (email) => {
  return await supabaseAdmin.auth.api.generateLink({ email, type: "invite" });
};
I tried simply using the screenshot here as a guide:
Not sure that's valid JavaScript since
type
and
email
are not in an object
I couldn't find anything about generateLink in the documentation
a
ah yes the example is bad sorry
should be
generateLink('invite','me@email.com')