Custom front-end app
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import { v5 as uuidv5 } from 'uuid';
import { signUp as cognitoSignUp } from 'aws-amplify/auth';
const getUserIdByEmail = (email: string) => uuidv5(email, usernameID);
const signUp = async ({ email, password }) => {
const response = await cognitoSignUp({
username: getUserIdByEmail(email),
password: password,
options: {
userAttributes: {
email: email
}
}
});
return response;
};
import { v5 as uuidv5 } from 'uuid';
import { confirmSignUp as cognitoConfirmSignUp } from 'aws-amplify/auth';
const getUserIdByEmail = (email: string) => uuidv5(email, usernameID);
const confirmSignUp = async ({ email, code }) => {
const response = await cognitoConfirmSignUp({
username: getUserIdByEmail(email),
confirmationCode: code
});
return response;
};
const username = selectedType === 'phone' ? phoneNumber : getUserIdByEmail(email);
const response = await signIn({
username,
password: password
});