<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 7:42 PM, Naif <span dir="ltr">&lt;<a href="mailto:nifs.arpegiuz@gmail.com" target="_blank">nifs.arpegiuz@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Thanks for the reply<br>
<br>
I downloaded the android project, and i have followed the instructions; I<br>
imported &#39;demo-realm.json&#39; and create the &#39;keycloak.json&#39; file(added on<br>
res/raw), but, when i run the project, i get on my smartphone:<br>
<br>
/WE&#39;RE SORRY ...<br>
Invalid parameter: redirect_uri/<br>
<br>
on the server console, i get:<br>
<br>
/WARN  [org.keycloak.events] (default task-50) type=LOGIN_ERROR,<br>
realmId=98ac4271-17a4-490a-97b3-d4f11d05510b, clientId=Android, userId=null,<br>
ipAddress=192.168.0.16, error=invalid_redirect_uri, response_type=code,<br>
redirect_uri=urn:ietf:wg:oauth:2.0:oob/<br></blockquote><div>^^^ Redirect uri your client is sending</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
and in my keycloak admin console(Clients -&gt; Android -&gt; Settings):<br>
<br>
/Access Type: confidential<br>
Valid Redirect URIs: <a href="http://oauth2callback" rel="noreferrer" target="_blank">http://oauth2callback</a></blockquote><div>^^^ Redirect URI your server is expecting </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Web Origins: <a href="http://oauth2callback/" rel="noreferrer" target="_blank">http://oauth2callback/</a><br>
<br>
Do you know, how can i solve this?<br></blockquote><div>Change one to the other.  I would suggest setting your  redirect uri in the KC console to urn:ietf:wg:oauth:2.0:oob/</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://aerogear-users.1116366.n5.nabble.com/Android-Native-Login-to-Keycloak-tp219p221.html" rel="noreferrer" target="_blank">http://aerogear-users.1116366.n5.nabble.com/Android-Native-Login-to-Keycloak-tp219p221.html</a><br>
<div class=""><div class="h5">Sent from the aerogear-users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</div></div></blockquote></div><br></div></div>