https://supertokens.com/ logo
#support-questions
Title
# support-questions
r

rp

09/24/2021, 4:32 PM
@User , so just to clarify, you can disable the sign up API as follows:
Copy code
EmailPassword.init({
    override: {
        apis: (oI) => {
            return {
                ...oI,
                signUpPOST: undefined
            }
        }
    }
})
Finally, you can manually sign up users like this:
Copy code
let signUpResponse = await EmailPassword.signUp("email", "password");

if (signUpResponse.status === "OK") {
    let user = signUpResponse.user;
    // TODO:...
} else if (signUpResponse.status === "EMAIL_ALREADY_EXISTS_ERROR") {
    // TODO: handle this error
}
And as @User said, the above works because
EmailPassword
is a singleton. Thank you @User