Two-factor authentication (2FA) is a multifactor security process where users must authenticate their identity with two different means. This ensures better protection of secured assets and information.
Traditional username and password combinations are prone to hacking and getting hacked has been on the rise. Implementing 2FA authentication will prevent hackers from accessing your accounts even if your password is stolen. 2FA is a recommended practice for securing all your online accounts and devices to protect sensitive information losses.
You will need a different set of components with features ranging from creating the secret codes, accessing and authenticating.
Time-based One-Time Password involves generating a one-time password from a shared secret key and the current timestamp using cryptographic algorithms. These libraries will help you generate secrete one-time passwords
[Unmaintained] Open source two-factor authentication for Android
Java 3655 Version:v0.9.0.1 License: Permissive (MIT)
A java library for implementing Time-based One Time Passwords for Multi-Factor Authentication.
Java 283 Version:Current License: Permissive (MIT)
Two Factor Authentication Java code implementing the Time-based One-time Password Algorithm
Java 231 Version:two-factor-auth-1.3 License: Permissive (ISC)
A one-time password (HOTP/TOTP) library for Java
Java 394 Version:java-otp-0.4.0 License: Permissive (MIT)
TOTP and HOTP Token for Andriod Devices
Java 64 Version:03.00 License: Others (Non-SPDX)
Typically the OTP codes are sent to the user's mobile phone using SMS. This also helps to validate the user's mobile number correctness. The user can then enter the secret code into the application to complete the multifactor authentication. The below libraries will help in sending SMS from your application.
SMSAPI Java client that allows you to send messages and administrate your SMSAPI account.
Java 15 Version:Current License: Others (Non-SPDX)
Java library for sending SMS via sms.ru provider.
Java 7 Version:Current License: No License
Code to Send SMS From PC to Mobile using Internet
Java 1 Version:Current License: No License
The unique generated one-time password is sent via email to the user. The user uses the code from the email and enters the code into the application to confirm the authentication.
Simple API, Complex Emails (Jakarta Mail smtp wrapper)
Java 1069 Version:8.0.0 License: Permissive (Apache-2.0)
Java library to easily send emails using the Mailgun service
Java 139 Version:v1.10.0 License: Permissive (MIT)
Using Biometrics for authentication has been made easy with mobile devices. Biometrics can include different choices, such as using fingerprints, voice, and face as the secondary authentication mechanism.
Android library to simplify Biometric authentication implementation.
Java 624 Version:v2.0.1 License: Permissive (Apache-2.0)
React Native module for iOS and Android biometrics
Java 499 Version:3.0.0 License: Permissive (MIT)
Portable secure biometric authentication using your smartphone camera
Java 14 Version:v1.0 License: Strong Copyleft (GPL-3.0)
A sample app for demonstrating biometric prompt for Android
Java 63 Version:Current License: Permissive (Apache-2.0)
Typically, push notifications are sent to your mobile app to authorize login requests. It will include the details of the access device details and once authorized, the login to the application is allowed. Below libraries help in implementing the push notification-based authorization.
React Native Local and Remote Notifications
Java 6558 Version:8.1.1 License: Permissive (MIT)
Push-notification mobile app for two-factor authentication (2FA) with the Gluu Server
Java 6 Version:Current License: Permissive (Apache-2.0)
Java Apple Push Notification Service Provider
Java 1782 Version:apns-1.0.0.Beta3 License: Permissive (BSD-3-Clause)
A Java library for sending APNs (iOS/macOS/Safari) push notifications
Java 1610 Version:pushy-0.15.2 License: Permissive (MIT)
React Native Library for OneSignal Push Notifications Service
TypeScript 1486 Version:4.5.1 License: Others (Non-SPDX)