added signup v3 endpoints and developed initial new signup flow

This commit is contained in:
Sheen Capadngan
2023-05-04 01:32:40 +08:00
parent f703ee29e5
commit 1172726e74
15 changed files with 243 additions and 34 deletions
@@ -8,6 +8,7 @@ interface Props {
protectedKey: string;
protectedKeyIV: string;
protectedKeyTag: string;
providerAuthToken?: string;
publicKey: string;
encryptedPrivateKey: string;
encryptedPrivateKeyIV: string;
@@ -49,9 +50,10 @@ const completeAccountInformationSignup = async ({
encryptedPrivateKeyTag,
salt,
verifier,
organizationName
organizationName,
providerAuthToken,
}: Props) => {
const { data } = await apiRequest.post('/api/v2/signup/complete-account/signup', {
const { data } = await apiRequest.post('/api/v3/signup/complete-account/signup', {
email,
firstName,
lastName,
@@ -64,7 +66,8 @@ const completeAccountInformationSignup = async ({
encryptedPrivateKeyTag,
salt,
verifier,
organizationName
organizationName,
providerAuthToken,
});
return data;
-1
View File
@@ -12,7 +12,6 @@ interface Login1 {
const login1 = async (loginDetails: {
email: string;
clientPublicKey: string;
userId?: string;
}) => {
const response = await fetch("/api/v2/auth/login1", {
method: "POST",
-1
View File
@@ -20,7 +20,6 @@ interface Login2Response {
const login2 = async (loginDetails: {
email: string;
clientProof: string;
userId?: string;
}) => {
const response = await fetch('/api/v2/auth/login2', {
method: 'POST',