[keycloak-user] Keycloak - Multi/2FA Factor - OTP - QR Code - Custom Login Screen - Rest API

Ankur Singhal getankur86 at gmail.com
Mon May 14 14:59:22 EDT 2018


 Hi All,
<https://stackoverflow.com/questions/50319327/keycloak-multi-2fa-factor-otp-qr-code-custom-login-screen-rest-api#>

I have *my own Login page where user enters username/password.* This
username/password are used to login through Keycloak Rest API.

http://localhost:8080/auth/realms/Demo/protocol/openid-connect/token

input - {username,password,grant_type,client_secret,client_id}

And in response i get access token.

Now i wish to enable Authenticator (Google Authenticator). I have enabled
it from backend. Now if user wishes to login thorugh my application, my
login page i need to get below details.

1.) Somehow i need to include QR Code that appears on keycloak login page
post username/password validation to show on my login screen for the first
time login once user enter username/password. So do we have any API which
return Keycloak QR code image in response.

2.) Subsequent login i will have OTP field, so need a REST api to pass OTP
along with username/password.

Please help with REST API if keycloak has any. Integrating through
Javascript.

Similar flow as described in use case 1 here
<http://lists.jboss.org/pipermail/keycloak-user/2018-February/013254.html>

Just want to use keycloak as a database, doing all operation for me, input
will be my screen. I do want redirection of URL's while login in and yet
should be standalone deployed.

https://stackoverflow.com/questions/50319327/keycloak-multi-2fa-factor-otp-qr-code-custom-login-screen-rest-api


Thanks

Ankur


More information about the keycloak-user mailing list