SMS based OTP in keycloak is possible?
Asked Answered
H

2

10

I am exploring keycloak and I want to build an application that was based on user mobile number, SMS OTP should go to the user for authentication. I am not finding any where.

Hilbert answered 27/8, 2019 at 12:26 Comment(0)
O
8

It is possible through extending Authentication mechanism, check Authentication SPI documentation

Take a look at existing solution: https://github.com/nickpack/keycloak-sms-authenticator-sns Even if it doesn't suite your needs you can take the source code as a reference point.

Ossification answered 27/8, 2019 at 13:46 Comment(2)
I tried this solution, but keycloak server doest start: Operation ("add") failed - address: ([("subsystem" => "microprofile-metrics-smallrye")]): java.util.ConcurrentModificationException at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1526) at java.base/java.util.HashMap$EntryIterator.next(HashMap.java:1524) at java.base/java.util.HashMap.putMapEntries(HashMap.java:507) at java.base/java.util.HashMap.<init>(HashMap.java:485)Pamela
Where I can find the file target/keycloak-sms-authenticator-sns-*.jar?Holliholliday
P
0

Please check code given in below link. https://github.com/9228883664/keycloak-otp-password-authenticator

You can use keycloak for OTP validation as primary login. Many portal want either user can login with username/password or can do login by entering registered mobile number and enter received OTP on portal to login. Valid token needs to be generated by calling keycloak API. This plugin serve the purpose of both user can login with either password or OTP. OOTB keycloak does not provide this feature, instead it provide 2F OTP authenticator with well-known OTP application.

Pico answered 9/8, 2022 at 15:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.