<div dir="ltr">Actually, the main problem is one of the flows where the password request appears in a popup, there&#39;s no redirect at all, and one of the things that were agreed upon when decided to change the authentication provider, was that nothing would be altered in the user experience.<div>
<br></div><div>So I really have to try and make keycloak &quot;fit in&quot; in these particular scenarios, they are not used as much as the ones where we&#39;ll use the keycloak login page with our own style, but I do have to make them work.</div>
<div><br></div><div>When you say I could use direct grant to get a token, would that count as the same as an user logging in? It&#39;s not really clear to me right now</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jul 25, 2014 at 9:56 AM, Stian Thorgersen <span dir="ltr">&lt;<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, but I&#39;m wondering why the following won&#39;t work:<br>
<br>
1. Ask for users email (in your app, not KC)<br>
2. Once you get to the flow where a user has to login:<br>
   a) If user doesn&#39;t exist in KC (you can use admin endpoints to check this) redirect to registration page on KC with email already entered<br>
   b) If user does exist in KC redirect to login page again with email already entered<br>
3. Redirect back to app<br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
&gt; From: &quot;Bill Burke&quot; &lt;<a href="mailto:bburke@redhat.com">bburke@redhat.com</a>&gt;<br>
&gt; To: &quot;Stian Thorgersen&quot; &lt;<a href="mailto:stian@redhat.com">stian@redhat.com</a>&gt;, &quot;Rodrigo Sasaki&quot; &lt;<a href="mailto:rodrigopsasaki@gmail.com">rodrigopsasaki@gmail.com</a>&gt;<br>
&gt; Cc: <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; Sent: Friday, 25 July, 2014 1:48:45 PM<br>
&gt; Subject: Re: [keycloak-user] Authenticate user without using login page<br>
&gt;<br>
&gt; It is because their first login screen is just something asking for an<br>
&gt; email.  If the email doesn&#39;t exist as a user, they want a redirect to<br>
&gt; the register page.<br>
&gt;<br>
&gt; On 7/25/2014 5:08 AM, Stian Thorgersen wrote:<br>
&gt; &gt; Yes, you can use the direct grant to retrieve a token.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;d like to know why redirecting to the login form, when styled to match<br>
&gt; &gt; your website, and using login_hint to pre-fill username/email doesn&#39;t<br>
&gt; &gt; work. Maybe there&#39;s something we can do so that you can still use the<br>
&gt; &gt; &quot;proper&quot; flow?<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt;&gt; From: &quot;Rodrigo Sasaki&quot; &lt;<a href="mailto:rodrigopsasaki@gmail.com">rodrigopsasaki@gmail.com</a>&gt;<br>
&gt; &gt;&gt; To: &quot;Stian Thorgersen&quot; &lt;<a href="mailto:stian@redhat.com">stian@redhat.com</a>&gt;<br>
&gt; &gt;&gt; Cc: &quot;Bill Burke&quot; &lt;<a href="mailto:bburke@redhat.com">bburke@redhat.com</a>&gt;, <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; &gt;&gt; Sent: Thursday, 24 July, 2014 6:13:17 PM<br>
&gt; &gt;&gt; Subject: Re: [keycloak-user] Authenticate user without using login page<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Sorry to keep insisting on this, but since it&#39;s being a huge showstopper<br>
&gt; &gt;&gt; so<br>
&gt; &gt;&gt; far, I just have to ask.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; If I don&#39;t mind trading off SSO and all the other benefits that the<br>
&gt; &gt;&gt; Keycloak login page provides me, would there be a way for me to do what I<br>
&gt; &gt;&gt; want?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Fri, Jul 18, 2014 at 5:44 AM, Stian Thorgersen &lt;<a href="mailto:stian@redhat.com">stian@redhat.com</a>&gt;<br>
&gt; &gt;&gt; wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt; We could add support for login_hint query param so you can have the<br>
&gt; &gt;&gt;&gt; username/email field on the login form pre-filled for the user, so once a<br>
&gt; &gt;&gt;&gt; user has to authenticate you redirect to login on KC and all they would<br>
&gt; &gt;&gt;&gt; have to do is enter their password.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; If you bypass the login forms you&#39;d loose SSO, multi-factor support,<br>
&gt; &gt;&gt;&gt; required actions, recover password, etc, etc, etc..<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; As Bill mentioned we provide very flexible login forms that can be<br>
&gt; &gt;&gt;&gt; templated using either just css or even FreeMarker templates if you need<br>
&gt; &gt;&gt;&gt; a<br>
&gt; &gt;&gt;&gt; lot of customization, so you should be able to make the login form<br>
&gt; &gt;&gt;&gt; integrate well with your website.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; ----- Original Message -----<br>
&gt; &gt;&gt;&gt;&gt; From: &quot;Rodrigo Sasaki&quot; &lt;<a href="mailto:rodrigopsasaki@gmail.com">rodrigopsasaki@gmail.com</a>&gt;<br>
&gt; &gt;&gt;&gt;&gt; To: &quot;Bill Burke&quot; &lt;<a href="mailto:bburke@redhat.com">bburke@redhat.com</a>&gt;<br>
&gt; &gt;&gt;&gt;&gt; Cc: <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; &gt;&gt;&gt;&gt; Sent: Thursday, 17 July, 2014 6:52:08 PM<br>
&gt; &gt;&gt;&gt;&gt; Subject: Re: [keycloak-user] Authenticate user without using login page<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; You think there could be a way to do this within keycloak itself?<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On Wed, Jul 16, 2014 at 4:41 PM, Rodrigo Sasaki &lt;<br>
&gt; &gt;&gt;&gt; <a href="mailto:rodrigopsasaki@gmail.com">rodrigopsasaki@gmail.com</a> &gt;<br>
&gt; &gt;&gt;&gt;&gt; wrote:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; I&#39;ll give you an example:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; We have a situation in our website where we only ask for the user&#39;s<br>
&gt; &gt;&gt;&gt; e-mail,<br>
&gt; &gt;&gt;&gt;&gt; and he can go on with the flow.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On a determined step of the flow, if we identify that this is an e-mail<br>
&gt; &gt;&gt;&gt; that<br>
&gt; &gt;&gt;&gt;&gt; we already have in our user database, we ask him for his password,<br>
&gt; &gt;&gt;&gt;&gt; authenticate him, and let him go on, if this e-mail is new, we redirect<br>
&gt; &gt;&gt;&gt; him<br>
&gt; &gt;&gt;&gt;&gt; to a page where he can register himself, and after that continue on.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On this specific case and others, we wouldn&#39;t like to have to redirect<br>
&gt; &gt;&gt;&gt; him to<br>
&gt; &gt;&gt;&gt;&gt; keycloak, because that would interrupt the flow that we designed.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On Wed, Jul 16, 2014 at 4:39 PM, Bill Burke &lt; <a href="mailto:bburke@redhat.com">bburke@redhat.com</a> &gt; wrote:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; <a href="http://docs.jboss.org/" target="_blank">http://docs.jboss.org/</a> keycloak/docs/1.0-beta-3/<br>
&gt; &gt;&gt;&gt;&gt; userguide/html/direct-access- grants.html<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; If you have to do it this way, please let us know why. Maybe we can<br>
&gt; &gt;&gt;&gt; solve the<br>
&gt; &gt;&gt;&gt;&gt; issue within keycloak itself.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On 7/16/2014 3:35 PM, Rodrigo Sasaki wrote:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Just for the sake of conversation, if I did want to handle my own login<br>
&gt; &gt;&gt;&gt;&gt; page, would there be a way for me to do it?<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On Tue, Jul 15, 2014 at 2:35 PM, Rodrigo Sasaki<br>
&gt; &gt;&gt;&gt;&gt; &lt; <a href="mailto:rodrigopsasaki@gmail.com">rodrigopsasaki@gmail.com</a> &lt;mailto: rodrigopsasaki@gmail. com &gt;&gt; wrote:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; I don&#39;t want to miss out on all of that, which is why we&#39;re mostly<br>
&gt; &gt;&gt;&gt;&gt; migrating everything to use keycloak that way.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; It&#39;s just that we have cases that are so specific, that it would be<br>
&gt; &gt;&gt;&gt;&gt; better to authenticate the user in a different manner, create the<br>
&gt; &gt;&gt;&gt;&gt; user session and everything, without redirecting.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; I&#39;ll have a look at that code. Thanks!<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On Tue, Jul 15, 2014 at 2:19 PM, Bill Burke &lt; <a href="mailto:bburke@redhat.com">bburke@redhat.com</a><br>
&gt; &gt;&gt;&gt;&gt; &lt;mailto: <a href="mailto:bburke@redhat.com">bburke@redhat.com</a> &gt;&gt; wrote:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; If you want to handle your own login pages, IMO, you are missing<br>
&gt; &gt;&gt;&gt;&gt; out on<br>
&gt; &gt;&gt;&gt;&gt; a lot of Keycloak features. Specifically:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; * SSO<br>
&gt; &gt;&gt;&gt;&gt; * forgot password<br>
&gt; &gt;&gt;&gt;&gt; * admin forced credential reset/setup<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Login pages can be styled however you like to look like your<br>
&gt; &gt;&gt;&gt;&gt; application.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; There is a REST api for obtaining an access token. Here is an<br>
&gt; &gt;&gt;&gt;&gt; example:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; <a href="https://github.com/keycloak/" target="_blank">https://github.com/keycloak/</a> keycloak/blob/master/examples/<br>
&gt; &gt;&gt;&gt;&gt; demo-template/admin-access- app/src/main/java/org/<br>
&gt; &gt;&gt;&gt;&gt; keycloak/example/AdminClient. java<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; On 7/15/2014 12:36 PM, Rodrigo Sasaki wrote:<br>
&gt; &gt;&gt;&gt;&gt;&gt; Is there a way to authenticate the user without having to<br>
&gt; &gt;&gt;&gt;&gt; input username<br>
&gt; &gt;&gt;&gt;&gt;&gt; and password on the login page?<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; For example:<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; Say there&#39;s a situation in my application where I request the<br>
&gt; &gt;&gt;&gt;&gt; user for<br>
&gt; &gt;&gt;&gt;&gt;&gt; his username and password, and I wouldn&#39;t like to redirect<br>
&gt; &gt;&gt;&gt;&gt; that to the<br>
&gt; &gt;&gt;&gt;&gt;&gt; keycloak login page to authenticate him, would there be a way<br>
&gt; &gt;&gt;&gt;&gt; for me to<br>
&gt; &gt;&gt;&gt;&gt;&gt; do that?<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;&gt;&gt; Rodrigo Sasaki<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; ______________________________ _________________<br>
&gt; &gt;&gt;&gt;&gt;&gt; keycloak-user mailing list<br>
&gt; &gt;&gt;&gt;&gt;&gt; <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; &gt;&gt;&gt;&gt; &lt;mailto: keycloak-user@lists. <a href="http://jboss.org" target="_blank">jboss.org</a> &gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/" target="_blank">https://lists.jboss.org/</a> mailman/listinfo/keycloak-user<br>
&gt; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;&gt; Bill Burke<br>
&gt; &gt;&gt;&gt;&gt; JBoss, a division of Red Hat<br>
&gt; &gt;&gt;&gt;&gt; <a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
&gt; &gt;&gt;&gt;&gt; ______________________________ _________________<br>
&gt; &gt;&gt;&gt;&gt; keycloak-user mailing list<br>
&gt; &gt;&gt;&gt;&gt; <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a> &lt;mailto: keycloak-user@lists. <a href="http://jboss.org" target="_blank">jboss.org</a> &gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/" target="_blank">https://lists.jboss.org/</a> mailman/listinfo/keycloak-user<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;&gt; Rodrigo Sasaki<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;&gt; Rodrigo Sasaki<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;&gt; Bill Burke<br>
&gt; &gt;&gt;&gt;&gt; JBoss, a division of Red Hat<br>
&gt; &gt;&gt;&gt;&gt; <a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;&gt; Rodrigo Sasaki<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; --<br>
&gt; &gt;&gt;&gt;&gt; Rodrigo Sasaki<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; _______________________________________________<br>
&gt; &gt;&gt;&gt;&gt; keycloak-user mailing list<br>
&gt; &gt;&gt;&gt;&gt; <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; &gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; Rodrigo Sasaki<br>
&gt; &gt;&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Bill Burke<br>
&gt; JBoss, a division of Red Hat<br>
&gt; <a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font face="Times New Roman">Rodrigo Sasaki</font><div></div></div>
</div>