I have configured google-authenticator-libpam pam module on system and it works.
to handle error or wrong secret key setup scenarios, we wanted to verify TOTP token during google authenticator secret key setup.
In our use-case, secret key displayed on WebGUI for users to setup TOTP authenticator app mobile device to generate TOTP, in any case if user missed configuring TOTP authenticator app on mobile then this use gets locked out. so we wanted make sure user has setup TOTP authenticator app on mobile and ask user to provide first TOTP generated as input to validate secret key setup.
does google-authenticator-libpam pam module provides any API like "check_timebased_code()" which can be consumed by applications(WebGUI) to validate OTP ??