Skip to main content
The <UrAuth> component provides a beautiful, fully-functional authentication screen out of the box. It supports Email/Password login, Sign Up, Password Resets, and OAuth (Social Login).

Usage

Simply drop the component into your login page. It will automatically detect if the user is logging in or signing up, and communicate with your urBackend project.

Props

All customization props are optional. If omitted, <UrAuth> falls back to the same default behavior/UI style as v0.1.x.

providers and enableEmailPassword

providers now accepts either:
or:

Example: Email/password only

Example: Google only

Example: Disable all methods

This renders the built-in No authentication methods are enabled for this screen. message.

enableEmailPassword interaction

  • enableEmailPassword is a shorthand global toggle.
  • When providers is an object and includes emailPassword, that object value takes precedence.
  • If providers.emailPassword is omitted, enableEmailPassword is used.

colors theme customization

Use colors to override theme tokens:
Set a custom brand color on the primary sign-in button:
If both colors.primaryColor and branding.primaryColor are provided, branding.primaryColor takes precedence.

branding white-label options

Example:

labels text overrides (with aliases)

Supported label keys:
  • Tabs: loginTab (signInTab alias), signupTab (signUpTab alias)
  • Titles: loginTitle (signInTitle alias), signupTitle (signUpTitle alias), forgotTitle, resetTitle, forgotSubtitle, resetSubtitle
  • Buttons: loginButton (signInButton alias), signupButton (signUpButton alias), forgotButton, resetButton, googleButton, githubButton
  • Field labels/placeholders: emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, nameLabel, namePlaceholder, otpLabel, otpPlaceholder
  • Footer/misc: forgotPasswordLink, socialDivider, footerSigninPrompt, footerSignupPrompt, footerForgotPrompt, noAuthMethods
Example:

Full v0.2.0 customization example

Migration (v0.1.x → v0.2.0)

  • providers now also accepts object form: { google?, github?, emailPassword? }
  • Existing array usage (['google', 'github']) still works
  • No breaking API changes otherwise

Behavior

  1. Email Login: Prompts the user for email and password. If successful, updates the global UrProvider state automatically.
  2. Social Login: Redirects the user to the provider (e.g. Google). Upon successful login, the user is redirected to the Site URL you configured in your urBackend Dashboard settings.
  3. Password Reset: Allows users to request an OTP and reset their password inline.