mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
Only send required data for reset password, magic link and send OTP (#33352)
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user