ReactUserLogin

A ready-to-use email/password authentication component with a built-in password reset flow using OTP verification. Wrap the component inside AuthixProvider before using it.

Usage

Import the component and wrap it with the Neuctra Authix provider.

Jsx
1import { AuthixProvider, ReactUserLogin } from "@neuctra/authix";
2import { authix } from "./neuctraAuthixInit";
3
4export default function LoginPage() {
5  return (
6    <AuthixProvider authix={authix}>
7      <ReactUserLogin
8        title="Welcome Back"
9        signupUrl="/signup"
10        onSuccess={(user) => console.log("Logged in:", user)}
11        onError={(err) => console.error(err)}
12      />
13    </AuthixProvider>
14  );
15}

Props

Available configuration options.

PropTypeDefaultDescription
logoUrlstringLogo image URL
logoLinkUrlstring/Logo link destination.
titlestring"Sign In to Your Account"Heading displayed above the form.
subtitlestring"Welcome back!..."Supporting text below the title.
primaryColorstring"#00C214"Primary accent color.
gradientstringgreen gradientBackground gradient.
darkModebooleantrueEnable dark theme.
signupUrlstringSignup page URL.
onSuccess(user) => voidCalled after successful login.
onError(error) => voidCalled when login fails.

SDK Methods Used

Internally, the component calls the following Neuctra Authix SDK methods.

loginUser({ email, password })requestResetUserPasswordOTP({ email })resetUserPassword({ email, otp, newPassword })

The password recovery flow is fully integrated. Users first request an OTP using their email, then verify the OTP and set a new password—all within the same component.