File size: 318 Bytes
acdb6ec | 1 2 3 4 5 6 7 8 9 10 11 12 13 | // frontend/src/api/auth.js
import api from "./client";
export async function requestOtp(email) {
const res = await api.post("/auth/request-otp", { email });
return res.data;
}
export async function loginWithOtp({ email, otp }) {
const res = await api.post("/auth/login", { email, otp });
return res.data;
}
|