anonymous onLinkAccount() never called using auth.api.signUpEmail() or auth.api.signInEmail()

onLinkAccount() logic seemed to work using authClient.signIn.email() however I am doing the function calls on the backend inside TRPC endpoint and therefore am calling auth.api.signUpEmail() or auth.api.signInEmail() which do not seem to work in this case. Is that expected behaviour?
2 Replies
bekacru
bekacru2mo ago
it should work with auth.api methods as well. But if it's not working currnetly please feel free to open gh issue.
saulgt
saulgt4w ago
Forward the headers to the api calls:
auth.api.signUpEmail({
headers: await headers(), // < Pass the headers here
body: {
email,
password,
name: fullName,


},
}),
auth.api.signUpEmail({
headers: await headers(), // < Pass the headers here
body: {
email,
password,
name: fullName,


},
}),

Did you find this page helpful?