Skip to main content

useSignInEmailPassword()

Overload 1 of 2

Use the hook useSignInEmailPassword to sign in a user using email and password.

const {
signInEmailPassword,
needsEmailVerification,
isLoading,
isSuccess,
isError,
error
} = useSignInEmailPassword()

console.log({ needsEmailVerification, isLoading, isSuccess, isError, error })

const handleFormSubmit = async (e) => {
e.preventDefault()

await signInEmailPassword('joe@example.com', 'secret-password')
}

Parameters


This overload doesn't accept any arguments.

Overload 2 of 2

Use the hook useSignInEmailPassword to sign in a user using email and password.

const {
signInEmailPassword,
needsEmailVerification,
isLoading,
isSuccess,
isError,
error
} = useSignInEmailPassword()

console.log({ needsEmailVerification, isLoading, isSuccess, isError, error })

const handleFormSubmit = async (e) => {
e.preventDefault()

await signInEmailPassword('joe@example.com', 'secret-password')
}

Parameters


email optional string


password optional string


otp optional string