[keycloak-dev] Moving to standardized Promises

Niko Köbler niko at n-k.de
Thu Sep 19 09:26:50 EDT 2019


+1
Nice idea.

But we should also consider if, when and how to skip the custom promises. There might also be customers out there who are using the lib as and UMD module, without using tools like webpack etc., which will automatically create polyfills for browsers not supporting native promises. And I guess, there are still a few.

However, updating the docs and printing a warning to the console is good start.

- Niko


> Jon Koops <jonkoops at gmail.com> hat am 19. September 2019 um 13:12 geschrieben:
> 
> 
> Hi all,
> 
> I've created some pull requests and tasks for moving towards standardized
> Promises instead of Keycloak's own custom implementation in order to start
> a discussion about how to move forward. There has already been some
> discussion about plans to migrate away from the current situation in
> KEYCLOAK-9346 <https://issues.jboss.org/browse/KEYCLOAK-9346>.
> 
> I believe the first order of business to start migrating towards a better
> place would be to start informing Keycloak's users about the change. In
> order to do so I propose to make the following changes:
> 
> 1. The documentation of the JavaScript Adapter should reflect the
> preference of using the native promises. We can accomplish this by updating
> the examples used and providing additional documentation of the promiseType
> field.
> 2. Users that are currently using Keycloak should be informed that
> standardized promises are preferred and that they should move away from the
> current implementation. In order to do so a deprecation warning should be
> logged in the console with instructions on how to migrate their existing
> code.
> 
> I've created the following issues and pull requests for this:
> 
> *Updates to the documentation preferring promiseType native*
> - https://github.com/keycloak/keycloak-documentation/pull/742
> - https://issues.jboss.org/browse/KEYCLOAK-11436
> 
> *Updates to the adapter to inform users of the deprecation*
> - https://github.com/keycloak/keycloak/pull/6318
> - https://issues.jboss.org/browse/KEYCLOAK-11435
> 
> Furthermore I would like to start a discussion on these changes and how to
> move forward after. Feedback on this is greatly appreciated!
> 
> Regards,
> Jon
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev


More information about the keycloak-dev mailing list