refresh token

This commit is contained in:
hamid zarghami
2025-03-06 12:54:24 +03:30
parent cfb6c330cf
commit 64be114e26
5 changed files with 76 additions and 12 deletions
+6
View File
@@ -5,6 +5,7 @@ import {
LoginWithOtpType,
LoginWithPasswordType,
OtpVerifyType,
RefreshTokenType,
RegisterType,
} from "../types/AuthTypes";
@@ -37,3 +38,8 @@ export const register = async (params: RegisterType) => {
const { data } = await axios.post(`/auth/register/complete`, params);
return data;
};
export const refreshToken = async (params: RefreshTokenType) => {
const { data } = await axios.post(`/auth/refresh`, params);
return data;
};
+4
View File
@@ -46,3 +46,7 @@ export type RegisterType = {
password: string;
code: number;
};
export type RefreshTokenType = {
refreshToken: string;
};