Details

    • Sprint:
      Keycloak Sprint 27, Keycloak Sprint 28
    • Steps to Reproduce:
      Hide

      Import KC adapter in module supported environment and try to call any KC method.

      import Keycloak from 'keycloak-js';
      
      Keycloak({}) // <-- 'keycloak-js'.default is not a function.
      
      Show
      Import KC adapter in module supported environment and try to call any KC method. import Keycloak from 'keycloak-js' ; Keycloak({}) // <-- 'keycloak-js' . default is not a function .
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      When importing Keyclok adapter in module environment default import is base64-js exports. This is caused because both KC and base64-js defines their exports to module.exports.

      Application using this approach are unable to update KC adapter dependency to newer version than 5.0.0. For instance cloud.redhat.com would like to use most recent version because we'd like to use hidden iframe, but we are unable to do that due to this limitation.

      Also generatePkceChallenge function will throw error that both sha256 and base64js are undefined, because the function expects them on window (when using modules they are on module.exports of defined by define function).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mitko Michal Hajas
                  Reporter:
                  karel.hala Karel Hala
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: