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
@@ -29,20 +29,17 @@ const attemptLogin = async (
{
email,
password,
userId,
}: {
email: string;
userId?: string;
password: string;
}
): Promise<IsLoginSuccessful> => {
const username = userId ?? email;
const telemetry = new Telemetry().getInstance();
return new Promise((resolve, reject) => {
client.init(
{
username,
username: email,
password
},
async () => {
@@ -51,7 +48,6 @@ const attemptLogin = async (
const { serverPublicKey, salt } = await login1({
email,
clientPublicKey,
userId,
});
client.setSalt(salt);
@@ -72,7 +68,6 @@ const attemptLogin = async (
} = await login2(
{
email,
userId,
clientProof,
}
);