Firebase Authentication
Integrate Firebase Authentication with your Xams application for secure user management.
Xams provides built-in Firebase authentication support with a customizable login page and comprehensive auth flows including multi-factor authentication (MFA).
Use the Xams Firebase template which includes a complete example. Follow the instructions in the README.md file to setup.

User Authentication Helper
The UserUtil class executes with every request to a Xams endpoint and handles user authentication, automatically creating Xams users from Firebase claims:
Project / UserUtil.cs
Branding
Use the authentication pages to set branding.
src/pages/login.tsx
src/pages/profile.tsx
src/pages/reset-password.tsx
src/pages/__/auth/action.tsx
React Protected Page
Use the useAuthProtect hook to protect pages and access user information:
src/pages/admin.tsx
Using Tanstack Query with Authentication
When using Tanstack Query with authenticated pages, always set enabled: auth.isLoggedIn to prevent queries from running before authentication is ready. All hooks must be called at the top level before any conditional returns.