Git Product home page Git Product logo

4d-google-authenticator's Introduction

Google Authenticator 4D

A 4D implementation of Google Authenticator. This can be compiled into a component or simply incorporated into your v18+ code to allow you to use the Google Authenticator.

Limitations

This implimentation uses an online service to produce the QR code. This presents a vulnerability in that the QR code could be saved by authenticatorapi.com though they wouldn't know what it's for.

Setting up

This is called pairing and you use the Pair method. It is required one time but may be called more, for example if a user gets a new phone. The user simply needs to download the app to their phone, open it and click the add button.

You pass an object to the Pair method containig 3 values:

  • your application name
  • the user name
  • a secret specific to the user. A UUID is a good candidate but any string will do.

For example:

$params:=New object
$params.appName:="MyApp Name"
$params.appInfo:="user name"
$params.appSecret:="thx1138"  //  this should be unique to each user - like their PK UUID

Pair ($params)

Pair dlog

That's it. The user is set up and there is nothing you need to store.

Validating

After the user enters their password call the Validate method. In this case you pass an object with the secret for this user. The user has 4 chances to enter the correct authentication code before the method fails.

Validate dlog

Example code for this:

If (Validate (New object("appSecret";"thx1138")))
	ALERT("User Validates!")
Else 
	ALERT("User not validated.")
End if 

4d-google-authenticator's People

Contributors

kirkbrooks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.