Create accounts and sign in
Build sign-up, verification and provider sign-in flows.
frontbacked.js exposes helper methods for authentication and post writes. These methods use the same endpoint configured in Frontbacked.init().
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Sign Up
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
When signup succeeds and Frontbacked returns a token, Frontbacked stores it for future authenticated requests and updates $auth. username is optional and can be checked first with Frontbacked.checkUsernameAvailability(username).
Verification emails during signup are currently paused. The emailVerification option, including its optional redirectTo, is still accepted for compatibility, but signup does not send a verification email. Use Frontbacked.sendEmailVerification() when your site explicitly needs to verify the signed-in user's address. Its redirectTo chooses the local page to open after successful verification.
In local development, if an explicit verification response contains localEmail.sent, Frontbacked shows a bottom notification with a link to the local mailbox.
If the active theme declares required fields in its FRL user schema, include them in data. Frontbacked validates those fields before creating the account. Missing required data stops the signup, so the user and any related records from after create are not partially saved.
Sign-Up And Sign-In Pages
Site admins can turn sign up and sign in on or off independently. Mark custom auth pages and links so Frontbacked can keep the theme in sync with those choices, including during same-site navigation:
Standard routes such as /signup, /register, /signin, and /login are recognized automatically. Use f-auth-page="signup|signin" and f-auth-link="signup|signin" for custom route names. When the matching option is unavailable, links stay hidden and the auth page cannot be used.
Send Email Verification
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
This sends or resends a verification email for the authenticated user. Frontbacked first checks the current $auth.emailVerified value and returns without sending a request when it is already true. Frontbacked also refuses to send for already verified users or for an email that does not belong to the current user.
Sign In
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
rememberMe controls where the auth token is stored.
| Value | Storage |
|---|---|
true | localStorage, survives browser restart. |
false | sessionStorage, clears with the browser session. |
If rememberMe is omitted, it defaults to true.
Provider Sign-In Buttons
Add f-auth-provider to a clickable element to start a provider sign-in flow for the current site. The attribute value is the provider id, such as frontbacked, google, or github.
Use the same flag on account creation pages and update the visible label:
Frontbacked shows provider buttons only when that provider is available for the site. If a provider is turned off, the button stays hidden so the email/password form can remain the visible fallback.
Sign in with Frontbacked
Enable Frontbacked sign-in in your site’s account settings, then add a button wherever people sign in:
Use f-auth-mode="signup" to offer Sign up with Frontbacked. People authenticate with their Frontbacked account and return to your site. The current site owner has full admin access automatically; other people receive admin access only when invited or added by an admin with permission to manage access. Signing in alone does not make someone an admin.
The owner appears in the admin list without a separate invitation. Owner access follows site ownership, so it moves to the recipient when a site is transferred. Other admins keep their assigned permissions.
If a theme uses an unsupported provider id, Frontbacked renders a visible setup error inside the element. This catches mistakes such as f-auth-provider="facebook" before the theme ships.
Frontbacked infers whether the visitor is signing in or signing up from the page class or path. Use f-auth-mode="signup" or f-auth-mode="signin" only when a custom route cannot be inferred cleanly. f-auth-return-to should be a local path that the visitor can open after sign-in.
f-google-auth still works as a backwards-compatible alias for f-auth-provider="google".
After the provider flow finishes, Frontbacked completes sign-in and updates $auth automatically. Theme developers do not need to write provider-specific sign-in code.
In local development, provider flows use simulated accounts so you can try sign-in, admin-only pages, and fb-admin access without connecting real provider credentials. Published sites use the real provider flow when the provider is configured and enabled.
The same flow can be started from JavaScript:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Frontbacked.signInWithGoogle(options?) and Frontbacked.signUpWithGoogle(options?) are Google-specific aliases. Custom callback pages can use Frontbacked.completeProviderAuth({ provider, ticket, rememberMe }), though most themes should let the normal provider flow finish automatically.
Continue with Manage account settings.