<div dir="ltr">Dear all, <div>I need to implement the following use case.</div><div><br></div><div>My web application is authenticated against a given realm on keycloak, using a simple user / password authentication model. But a part of my web app would require a stronger authentication mechanism (a second factor in fact) based on the current user.</div><div><br></div><div>What&#39;s the &quot;best&quot; solution using keycloak ? I was thinking of two different solutions </div><div>1. add an attibute in my OIDC token that could be named &quot;level&quot;, and having an adapter that would check the level of the token, and if not corresponding, redirect to the realm that would ask for the second factor of authentication</div><div>2. Create a &quot;2FA&quot; realm,that would rely on the simple authentication realm... but is it possible in the same web app (I mean, to use two realms)</div><div><br></div><div>Open to any ideas</div><div><br></div><div>Thanks </div><div><br></div><div>St</div><div> </div></div>