FM BetterForms
BF Editorfmbetterforms.com
1.0 dont use
1.0 dont use
  • Introduction
  • Features Summary
  • Getting Started
    • System Overview
    • Integration
      • 1. Configure FileMaker Server
      • 2. Add your Server to BetterForms
      • 3. Introduction to Hooks
      • 4. Create your first Site
      • 5. Create your first Page
      • 6. Configure your FileMaker File(s)
      • 7. Run your first Hook
      • Next Steps
    • Common Customizations
      • Introduction to Actions
      • Introduction to Buttons
      • Page Navigation
      • Displaying Data in a Table
    • Support
      • Hacking a Webpage
      • Learning JSON
  • Reference
    • Site Settings
      • Navigation
      • Slots / Code Injection
      • App Model
      • Site-wide Named Actions
    • Page Settings
      • Data Model
      • Card / Window Modals
      • Validation
        • Custom Validators
      • Misc Page Settings
    • Page Elements
      • Common
        • Button
        • Data Table
        • HTML
      • Grouping Elements
        • Tabs
        • panel
        • accordion
        • listrows
      • Uploading Files
        • dropzone
        • dropzone to S3
        • uploadCare
      • Misc Elements
        • Plain Text / Code Editor
        • signature
        • fullCalendar
        • rangeSlider
      • Payment Gateways
        • Authorize.net
        • PayPal
        • Stripe
      • Adding Custom Page Elements
    • Actions Processor
      • Named Actions
      • Actions
        • runUtilityHook
        • path
        • debounce
        • throttle
        • showAlert
        • showModal / hideModal
        • function
        • clipboard
        • cookie
        • setFocus
        • wait
        • emit
        • validate
        • channelJoinAnon
        • channelLeaveAnon
        • messageSend
        • messageSendAnonChannel
      • Authentication Actions
    • Script Hooks
      • Globals Variables
        • $$BF_Model
        • $$BF_App
        • $$BF_State
      • Keeping Keys Private
      • Reducing Payload Size
      • API Callback Endpoint
      • Common Hooks
      • Scoped Hooks
    • Users & Authentication
      • Managing User Accounts
      • Custom Login Pages
    • Advanced Configuration
      • Custom Domains
    • BF Utility Functions
    • BF Error Codes
    • Messaging
      • Adding users to channels
      • Removing users from channels
      • Sending messages
      • Get connected users
      • Get active channels
  • Usage Tips
    • Troubleshooting
      • Debugging
      • Frozen Actions Queue
    • JavaScript Tips
      • Calling Named Actions from HTML Vue Events
      • Calculations
    • System Overview
    • Forms Processor
      • Form Types
      • HTML & VueJS
      • Styling and Design
      • JS Caclulations and Functions
    • Customizing and Styling
      • Custom Components
      • Custom CSS
      • Custom Components
      • Page Pre-loaders
      • Favicon
    • Design Patterns and Best Practices
      • Working with environments
      • Handling Data
      • Saving Data
      • Optimization
      • Business Logic
      • UI / UX
  • Security
    • Authentication
    • Security White Paper
    • Firewalls
    • Technology Stack
  • Compatibility
Powered by GitBook
On this page

Was this helpful?

  1. Reference
  2. Actions Processor

Authentication Actions

PreviousmessageSendAnonChannelNextScript Hooks

Last updated 3 years ago

Was this helpful?

The authentication set of actions are used on pages that have custom login and registration screens.

  • authLogin - Performs an authentication login

  • authLogout - Performs logout

  • authReset - Performs a password reset action

  • authForgot - Performs a forgotten password reset hook

  • _authVerify _ - Performs a verification of the verify token

  • authResend - Re/sends the email verification token

  • authRegister - Performs a registration and if successful, runs the

Each of these actions should be attached to a button that the user will click to perform the respective task. They do not take any options, but some do require that an email and/or password key is present in your data model.

Action Name

Requires email key

Requires password key

Requires token*

authLogin

✅

✅

authLogout

authReset

✅

✅

authForgot

✅

authVerify

✅

authResend

✅

authRegister

✅

✅

If these values are required, you should add validation to those fields and run a validate action before the authentication action.

The authReset action doesn't require an email field, but it does require a valid token slug be present. The token is automatically generated and appended to the URL when you run the authForgot action, so you don't need to do anything with it on the page.

Similarly, the authVerify action only checks for the verification token in URL. It's recommended that this action be used within the onFormLoad named action as the user will be clicking the link in their email to get to this page.

Error Handling

{
  "type": "html",
  "html": "<h2 class=\"warning\">{{model.authMessage}}</h2>",
  "styleClasses": "col-md-12"
}

The authRegister action does not require 2 password fields. If you want the user to enter their password twice before creating an account, you should create a that checks if the password key also matches some other password2 key.

Authentication error messages will get added automatically to your under the authMessage key. You can display this info with any decoration you would like with an html element and some Vue syntax as follows:

custom validator
data model
Custom Login Pages
onRegistrationHook