Adding 2FA to Liferay DXP 7.1
We recently had a requirement to add 2 Factor Authentication support for a demo, so I am pleased to share our implementation with the community.
On login the user sees a new 'Authenticator Code' field below Password:
The user populates their credentials, launches Google Authenticator app (or other 2FA app) on their phone and gets their code:
The user enters it on screen, clicks Sign In and hey presto, they have logged in with 2FA.
QR Codes are used to share the profile details with the end user:
These are shared with the end user by email, and for convenience (e.g. for Demos & testing) the QR Code is available through the Liferay profile screens (on the Password tab):
To simplify rollout:
The source is available here: https://github.com/michael-wall/liferay-2fa including a readme with deployment steps and more information on configuration, limitations (e.g. storing Secret Keys in plain text) etc.