verify code/otp

This commit is contained in:
Muhammad Fajar
2022-11-14 14:31:48 +07:00
parent 23be392f18
commit 05bb1f3c7e
4 changed files with 22 additions and 20 deletions

View File

@@ -132,7 +132,7 @@ function AuthProvider({ children }: AuthProviderProps) {
const validateOtp = async (phoneOrEmail: string, otp: string) =>
axios
.post('/verify-code', { otp })
.post('/verify-code', { phoneOrEmail: phoneOrEmail, otp })
.then((response) => {
const { user, token } = response.data.data;
setSession(token);