FluentAuth’s forms let you build your own login and signup pages instead of sending members to
wp-login.php. They are ordinary shortcodes, so they work in the block editor, the classic
editor, and any page builder that renders shortcodes.
Turning forms on
Under Settings → Login & Signup Forms, turn on Shortcode forms. With it off,
the form shortcodes render nothing, so a form cannot appear on a page by accident. The two that
belong to other modules follow their own switch: [fs_auth_buttons] needs social login on, and
[fluent_auth_google_one_tap] needs One-Tap on.
The shortcodes
| Shortcode | Renders |
|---|---|
[fluent_auth] | The whole flow: login, with links to signup and password reset, each swapping in place |
[fluent_auth_login] | The login form only |
[fluent_auth_signup] | The registration form only |
[fluent_auth_reset_password] | Request a reset link, and set a new password from that link |
[fluent_auth_magic_login]…[/fluent_auth_magic_login] | The magic-link form; the enclosed content is its heading |
[fs_auth_buttons] | The social login buttons on their own |
[fluent_auth_google_one_tap] | The Google One-Tap prompt; see Google One-Tap |
Registration through [fluent_auth] and [fluent_auth_signup] follows WordPress’s
Anyone can register setting. When it is off, [fluent_auth] leaves the signup form and its
link out, and a standalone [fluent_auth_signup] says registration is not enabled.
Attributes
The form shortcodes accept:
| Attribute | Default | Meaning |
|---|---|---|
redirect_to | the user’s redirect rule | Where to send the user after login or signup. self reloads the current page. Anything that is not a valid absolute URL is ignored |
show-signup | false | On [fluent_auth_login], show the “Create an Account” link |
show-reset-password | false | On [fluent_auth_login], show the “Reset Password” link |
hide | false | Render the form hidden, to be revealed by one of those two links |
[fluent_auth] is the three forms stacked: it turns both links on for you and passes
hide="true" to the signup and reset forms, which is what hide is for. You only need these
attributes when you are placing [fluent_auth_login] on its own.
Example, a members page that sends people to their account after signing in, with both links under the form:
[fluent_auth_login redirect_to="https://example.com/account" show-signup="true" show-reset-password="true"]
[fs_auth_buttons] takes a different set: title, title_prefix and redirect (which
defaults to the current page). [fluent_auth_google_one_tap] takes type and delay; see
Google One-Tap.
Visitors who are already signed in
Every form shortcode shows “You are already logged in” with a link home rather than a form. To change that text, or to render nothing at all, filter it:
// Render nothing instead of the notice.
add_filter('fluent_auth/already_logged_in_message', '__return_empty_string');
Signup fields
The registration form asks for first name, last name, username, email and password. Last name
is optional. To change the fields, use the fluent_auth/registration_form_fields filter, and
fluent_auth/signup_default_role to change the role new accounts get.
What the forms include
- Social login buttons, when a provider is on.
- The magic-login link under the password form, when magic login is on.
- The second-factor step, when the role requires one.
- Email verification on signup, when Verify email addresses is on.
- Terms and conditions text, from the login page designer.
They submit over AJAX and show errors inline, so the page does not reload on a wrong password.
Styling
Each form has its own wrapper class, so a theme can style them without touching the
plugin: .fls_auth_wrapper for [fluent_auth], .fls_login_wrapper, .fls_registration_wrapper,
.fls_reset_pass_wrapper and .fls_magic_login_form for the single forms. Fields share
.fls_field_group with a per-field .fls_field_{name}, labels are .fls_field_label, and the
social buttons are .fs_auth_btn with .fs_auth_google, .fs_auth_github or
.fs_auth_facebook. The login page designer sets the button colour
and labels for wp-login.php.