<div dir="ltr">Hello<div><br></div><div>I would like to have the &quot;<font color="#333333" face="open sans, helvetica, arial, sans-serif"><span style="font-size:12px;line-height:20px">Username Password Form&quot; auth type as a fallback option - I&#39;ve setup my personalized auth methods, but if they don&#39;t succeed I wan&#39;t the user to be shown the login form.</span></font></div><div><font color="#333333" face="open sans, helvetica, arial, sans-serif"><span style="font-size:12px;line-height:20px"><br></span></font></div><div><font color="#333333" face="open sans, helvetica, arial, sans-serif"><span style="font-size:12px;line-height:20px">The issue that I face  is that even when I </span><span style="line-height:20px">authenticate the user successfully (in my Authenticator </span></font><span style="line-height:20px;color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif">code with </span><font color="#333333" face="open sans, helvetica, arial, sans-serif"><span style="line-height:20px">context.setUser(myUser);</span></font><span style="color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif;line-height:20px"> context.success(); ) the login form is still shown to the user, even if it&#39;s inside a auth type &quot;Browser Forms&quot; set up as alternative. </span></div><div><span style="line-height:20px;color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif"><br></span></div><div><span style="line-height:20px;color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif">I worked around it creating a class called </span><font color="#333333" face="open sans, helvetica, arial, sans-serif"><span style="line-height:20px">AlternativeUsernamePasswordFormFactory that extends UsernamePasswordFormFactory, and the only change that I did to it was to add the AuthenticationExecutionModel.Requirement.ALTERNATIVE to the REQUIREMENT_CHOICES . Now, if I set this new auth type as alternative in Keycloak, it does what I want.</span></font></div><div><font color="#333333" face="open sans, helvetica, arial, sans-serif"><span style="line-height:20px"><br></span></font></div><div><font color="#333333" face="open sans, helvetica, arial, sans-serif"><span style="line-height:20px">So my questions are: am I missing something to mark my Authenticator as sufficient to end the flow and return to the client? if not, is there a reason why </span></font><span style="color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif;line-height:20px">UsernamePasswordFormFactory doesn&#39;t provide the ALTERNATIVE option, and can I suggest a patch to add it to this class?</span></div><div><span style="color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif;line-height:20px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif;line-height:20px">Cheers</span></div><div><span style="color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif;line-height:20px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:&quot;open sans&quot;,helvetica,arial,sans-serif;line-height:20px">filipe</span></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">filipe lautert</div></div>