[keycloak-dev] Javascript adapter: cordova implementation is broken
Bruno Oliveira
bruno at abstractj.org
Wed Apr 17 16:36:44 EDT 2019
Hi Alan, could you please file a bug reporting the affected version and
also all the steps the reproduce? If you have a PR for that, feel free
to attach in the same Jira.
Thank you.
On 2019-04-17, Alan Balbo wrote:
> Hi,
>
> I found an issue in the javascript adapter (
> *adapters/oidc/js/src/main/resources/keycloak.js*) : the "*cordova*"
> implementation is broken, and is also inconsistent with the other
> implementations provided (both "*default*" and "*cordova-native*"):
>
> 1) The *register* method (l. *1324*) does not take an "*options*"
> parameter, even though it uses it two lines below. It causes the execution
> to stop and throw an error, breaking the authentication process. This is an
> error induced by commit *f6125a25* (KEYCLOAK-6655)
> 2) If we look at other implementations of the same method (l. *1171* and l.
> *1389*), both return a promise. But the cordova implementation does not,
> resulting in an inconsistency that I find weird. This is a big issue when
> writing typescript services on top of it (e.g. keycloak-angular).
>
> I would suggest a fix for those issues, as it makes the cordova
> implementation unusable. First and foremost it should take an "options "
> parameter and the function could be rewritten to be consistent with the
> other implementations, i.e. making it return a promise and parsing the
> callback properly.
>
> Let me know what you think. Maybe it should be two distinct issues (one for
> the bug and one for the promise).
>
> Regards,
> Alan
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
--
abstractj
More information about the keycloak-dev
mailing list