Skip to content

Latest commit

 

History

History

totp-app

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

TOTP Generator Example

This example shows you how to build your own Google Authenticator clone for your brand. Users can scan a QR image (during enrollment in the Okta TOTP factor: https://developer.okta.com/docs/api/resources/authn/#enroll-okta-verify-totp-factor) and then generate codes that can be used to verify the TOTP factor.

Prerequisites

Before running this sample, you will need the following:

  • An Okta Developer Account, you can sign up for one at https://developer.okta.com/signup/.
  • An Okta Application, configured for iOS client. This is done from the Okta Developer Console and you can find instructions here. When following the wizard, use the default properties. They are designed to work with our sample applications.
  • Setup MFA for your Okta Developer Account, enable Google Authenticator factor.

Running This Example

To run this application, you first need to clone this repo and then enter into this directory:

git clone https://github.com/okta/samples-ios.git
cd totp-app/

Then install dependencies:

pod repo update
pod install

Now you can build and run the application.

Clicking the Add button will allow you to setup TOTP generator for your account. You can do this either by scanning QR image or by entering seret key manually. Once you do this, TOTP will be refreshed automatically.