mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 07:33:18 +00:00
feat: updated ui for srp handover
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
SendMfaTokenDTO,
|
||||
SRP1DTO,
|
||||
SRPR1Res,
|
||||
TOauthTokenExchangeDTO,
|
||||
VerifyMfaTokenDTO,
|
||||
VerifyMfaTokenRes,
|
||||
VerifySignupInviteDTO
|
||||
@@ -92,6 +93,7 @@ export const useLogin2 = () => {
|
||||
mutationFn: async (details: {
|
||||
email: string;
|
||||
clientProof: string;
|
||||
password: string;
|
||||
providerAuthToken?: string;
|
||||
}) => {
|
||||
return login2(details);
|
||||
@@ -99,6 +101,20 @@ export const useLogin2 = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const oauthTokenExchange = async (details: TOauthTokenExchangeDTO) => {
|
||||
const { data } = await apiRequest.post<Login2Res>("/api/v1/sso/token-exchange", details);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const useOauthTokenExchange = () => {
|
||||
// note: use after srp1
|
||||
return useMutation({
|
||||
mutationFn: async (details: TOauthTokenExchangeDTO) => {
|
||||
return oauthTokenExchange(details);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const srp1 = async (details: SRP1DTO) => {
|
||||
const { data } = await apiRequest.post<SRPR1Res>("/api/v1/password/srp1", details);
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user