Skip to content

๐Ÿ”’ Keycloak Authentication Provider implementation to get a two factor authentication with a OTP/code/token send via Email (through SMTP)

License

Notifications You must be signed in to change notification settings

concosminx/keycloak-2fa-email-authenticator

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”’ Keycloak 2FA Email Authenticator

Keycloak Authentication Provider implementation to get a two factor authentication with an OTP/code/token send via Email (through SMTP)

When logging in with this provider, you can send a verification code (otp) to the user's e-mail address. Tested with Keycloak version 19.x, if you are using different Keycloak version, don't forget to change the version in pom.xml file.

The Server Development part of the Keycloak reference documentation contains additional resources and examples for developing custom Keycloak extensions.

๐Ÿš€ Deployment

Provider

mvn package will be create a jar file. copy keycloak-2fa-email-authenticator.jar to keycloak/providers/ directory.

if you are Dockerized keycloak then copy to /opt/jboss/keycloak/standalone/deployments/ directory.

Theme Resources

html/code-email.ftl is a html email template. Copy to themes/base/email/html/

text/code-email.ftl Copy to themes/base/email/text/

messages/*.properties Append to themes/base/email/messages/messages_en.properties

Configuration

Email Configuration

SMTP setting configure for e-mail send. Realm Settings/Email

Authentication Flow

Create new browser login authentication flow and add Email OTP flow before Username Password Form.

About

๐Ÿ”’ Keycloak Authentication Provider implementation to get a two factor authentication with a OTP/code/token send via Email (through SMTP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 83.3%
  • FreeMarker 16.7%