Add two-factor

This commit is contained in:
2024-03-01 15:33:30 +08:00
parent e563c2e8be
commit 935a1a223a
12 changed files with 399 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import {
URL_REGISTER,
URL_RESEND,
URL_RETRIEVE,
URL_TWO_FACTOR,
URL_VERIFY
} from '@/constants/urls.constants'
import request from '@/services'
@@ -21,4 +22,12 @@ export const r_auth_retrieve = (param: RetrieveParam) => request.post(URL_RETRIE
export const r_auth_login = (param: LoginParam) => request.post<TokenVo>(URL_LOGIN, param)
export const r_auth_two_factor_create = () => request.get<TwoFactorVo>(URL_TWO_FACTOR)
export const r_auth_two_factor_validate = (param: TwoFactorValidateParam) =>
request.post(URL_TWO_FACTOR, param)
export const r_auth_two_factor_remove = (param: TwoFactorRemoveParam) =>
request.delete(URL_TWO_FACTOR, param)
export const r_auth_logout = () => request.post(URL_LOGOUT)