PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV, WEBDEV and WINDEV Mobile 26 feature!
  • Validity period
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Verifies the code given by an authentication application.
Example
IF TwoFactorAuthenticationCheckCode(nCode, sTOTPKey) = False THEN
Error("Invalid code.")
RETURN
END
Syntax
<Result> = TwoFactorAuthenticationCheckCode(<Code> , <TOTP key>)
<Result>: Boolean
  • True if the code is valid,
  • False otherwise.
<Code>: Integer
6-digit code generated by the authentication application.
<TOTP key>: Character string
ANSI string that contains the TOTP key of the user to be authenticated.
Remarks

Validity period

  • The code validity period is slightly longer than the period shown by the authentication application. For example, when Google Authenticator shows a new code, the previous code is still valid for 1 minute.
  • TwoFactorAuthenticationCheckCode checks the codes generated 1 minute before and 1 minute after the verification request is made.
  • WEBDEV - Server code For a website, make sure the web server time is correct.
Related Examples:
WW_Two-factor_Authentication Training (WEBDEV): WW_Two-factor_Authentication
[ + ] This example shows how to use two-factor authentication to secure access to user accounts.
It uses TOTP authentication, which generates a 6-digit code every 30 seconds.

The code is generated by all Authenticators that use TOTP (Google, Microsoft, etc.)
Component: wd260ggl.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment