⟵ hearthere ⟶
  • Quick start
  • Install MIT
  • Install PRO
  • Updating
  • Optimization
  • Update v4-v6
  • Backups
  • Console utility bin/totum
  • Basics for users
  • Interface and Layout
  • Tables and their parameters
  • Prefilter
  • Fields and their parameters
  • Syntax
  • Code, actions, formatting
  • Relational relationships
  • Calculation order and calculation units
  • Auto-complete calculations and timing
  • Duplicate rows and cycles
  • Comparisons
  • Functions
  • Debugging
  • Print and CSV
  • API
  • Roles and users
  • Notifications
  • Scheduled Actions
  • System tables
  • Trees
  • Anonymous tables
  • External Forms
  • Exporting and importing tables
  • [PRO] MeiliSearch
  • [PRO] Databases
  • [PRO] Custom CSS
  • [PRO] Custom docs
  • [PRO] LDAP AD
  • [PRO] File versions
  • [PRO] List-unsubscribe
  • [PRO] Dynamic fields
  • [PRO] Only Office
  • [PRO] Auth Tokens
  • [PRO] 2FA
  • h_pro_auth_secret
  • h_pro_auth_message
  • h_pro_auth_resend_time
  • h_pro_auth_live_time
  • h_pro_auth_on_off
  • Settings in Conf.php
  • [PRO] Superlang
  • [PRO] Daemons
  • [PRO] Profiler
  • Connecting functions
  • [SRV] Installation and Connection
  • [SRV] Export, PDF, Upload, and Preview
  • [SRV] XLSX/DOCX Generators
  • PRO 2FA

    In the Settings table, you need to fill in the codes for the secret and its sending, the resend time, the lifetime, and enable it.

    h_pro_auth_secret

    Code generating the secret. The generated string will be passed to the sending code in the variable $#secret and recorded in the database for subsequent verification.

    For example:

    =: strRandom(length: 4; numbers: "true"; letters: "false"; symbols: "false")
    

    h_pro_auth_message

    Code for sending the secret generated by the previous code. The code receives two variables:

    • $#secret – returns the string from the secret code.

    • $#userId — in both codes returns the user id.

    You can use any action code capabilities. h_pro_auth_message is executed as an action code.

    For example, you can call getFromScript to send an SMS to the user's number or send the code via a bot in telegram.
    

    For example:

    a1=: notificationSend(users: $#userId; title: "Login Code"; eml: str`"Your secret code" ++ $#secret`)
    
    a2=: str`"Code <b>sended</b>" to your email`
    

    The string returned by this code will be displayed above the code input window.

    h_pro_auth_resend_time

    Resend time in seconds — the wait time before the next sending is possible.

    h_pro_auth_live_time

    Lifetime of the generated code in minutes — if the correct code is entered outside this time, it will not work.

    If the number of secret requests during the lockout period exceeds the limit, the user will be blocked and redirected to the authorization page.
    

    h_pro_auth_on_off

    Enable/disable.

    Settings in Conf.php

    You can disable the second factor check. Add a line to Conf.php (you need to pass a list of logins):

    public $loginsWithoutTwoFactorAuth=["admin","another_user"];