Only send required data for reset password, magic link and send OTP (#33352)

This commit is contained in:
Joshen Lim authored and GitHub committed 2025-02-05 18:59:59 +08:00
1 parent 03af61cd81
commit 357936f9eb
3 files changed
+3 -3

No files matched your search

@@ -13,7 +13,7 @@ export type UserResetPasswordVariables = {
export async function resetPassword({ projectRef, user }: UserResetPasswordVariables) {
const { data, error } = await post('/platform/auth/{ref}/recover', {
params: { path: { ref: projectRef } },
body: user,
body: { email: user.email },
})
if (error) handleError(error)
@@ -13,7 +13,7 @@ export type UserSendMagicLinkVariables = {
export async function sendMagicLink({ projectRef, user }: UserSendMagicLinkVariables) {
const { data, error } = await post('/platform/auth/{ref}/magiclink', {
params: { path: { ref: projectRef } },
body: user,
body: { email: user.email },
})
if (error) handleError(error)
@@ -13,7 +13,7 @@ export type UserSendOTPVariables = {
export async function sendOTP({ projectRef, user }: UserSendOTPVariables) {
const { data, error } = await post('/platform/auth/{ref}/otp', {
params: { path: { ref: projectRef } },
body: user,
body: { phone: user.phone },
})
if (error) handleError(error)