【问题标题】:okta-auth-js Uncaught TypeError: Super expression must either be null or a functionokta-auth-js Uncaught TypeError: Super expression must be null or a function
【发布时间】:2021-07-30 15:06:21
【问题描述】:

在进行生产构建后,我在控制台中收到此错误并且应用程序未加载。

enter image description here

我的环境:

OS: Linux/Ubuntu
React version: 16.13.0
@okta/okta-auth-js: 5.2.2
@okta/okta-react: 6.0.0
@okta/okta-signin-widget: 5.5.0

【问题讨论】:

    标签: reactjs okta okta-signin-widget


    【解决方案1】:

    所以基本上我使用了 okta 的 CDN 并在 index.html 中对其进行了初始化,并且成功了。

    把它放在你的 index.html 头标签中。

    <script
      src="https://global.oktacdnenter code here.com/okta-auth-js/4.5.0/okta-auth-js.min.js"
      type="text/javascript"
    ></script>
    <script>
      var redirectUri = `${location.origin}/okta`;
        window.myOkta = new OktaAuth({
         ...your credentials goes here.
        })
    </script>
    

    现在您可以将 myOkta 变量用作 okta Api。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-18
      • 2016-12-27
      • 1970-01-01
      • 2015-07-18
      • 2016-06-17
      • 1970-01-01
      • 2020-03-01
      • 2019-02-25
      相关资源
      最近更新 更多