passing additional data from authClient to server betterAuth instance
is there a way to pass additional data from client to server when sending emails? For example when sending reset password email, instead of just sending the user's email and callbackUrl as data i also want to send locale which isn't part of the request body so i can generate the email with appropriate language
4 Replies
I don't know if I understand correctly, but i would specify the current locale in some variable, then pass it to email sending function.
yeah, thats the idea, but whats the recommended way of doing to it pass from client to server. For eg on client i do:
and on server I do:
how would i pass
locale
?AFAIK There isn't a way. You have to make the API endpoint yourself for that.
can it be done by attaching it to headers or cookies or something?