ForgeRock SDKs

Generate one-time passwords

To obtain the current and next tokens by using the OathTokenCode object, call Oath.getOathTokenCode():

OathTokenCode token = oath.getOathTokenCode();
String otp = token.getCurrentCode();

The user sees something like this:

Generating a HOTP Code in Android
Copyright © 2010-2023 ForgeRock, all rights reserved.