<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:
Example: Email/password only
Example: Google only
Example: Disable all methods
No authentication methods are enabled for this screen. message.
enableEmailPassword interaction
enableEmailPasswordis a shorthand global toggle.- When
providersis an object and includesemailPassword, that object value takes precedence. - If
providers.emailPasswordis omitted,enableEmailPasswordis used.
colors theme customization
Use colors to override theme tokens:
colors.primaryColor and branding.primaryColor are provided, branding.primaryColor takes precedence.
branding white-label options
labels text overrides (with aliases)
Supported label keys:
- Tabs:
loginTab(signInTabalias),signupTab(signUpTabalias) - Titles:
loginTitle(signInTitlealias),signupTitle(signUpTitlealias),forgotTitle,resetTitle,forgotSubtitle,resetSubtitle - Buttons:
loginButton(signInButtonalias),signupButton(signUpButtonalias),forgotButton,resetButton,googleButton,githubButton - Field labels/placeholders:
emailLabel,emailPlaceholder,passwordLabel,passwordPlaceholder,nameLabel,namePlaceholder,otpLabel,otpPlaceholder - Footer/misc:
forgotPasswordLink,socialDivider,footerSigninPrompt,footerSignupPrompt,footerForgotPrompt,noAuthMethods
Full v0.2.0 customization example
Migration (v0.1.x → v0.2.0)
providersnow also accepts object form:{ google?, github?, emailPassword? }- Existing array usage (
['google', 'github']) still works - No breaking API changes otherwise
Behavior
- Email Login: Prompts the user for email and password. If successful, updates the global
UrProviderstate automatically. - Social Login: Redirects the user to the provider (e.g. Google). Upon successful login, the user is redirected to the
Site URLyou configured in your urBackend Dashboard settings. - Password Reset: Allows users to request an OTP and reset their password inline.
