# Okta SSO stopped functioning after upgrading from v3.02 to v4.05

**URL:** <https://discourse.nodered.org/t/okta-sso-stopped-functioning-after-upgrading-from-v3-02-to-v4-05/94405>\
**Category:** General\
**Tags:** docker\
**Created:** [6 January 2025 15:23 UTC](https://discourse.nodered.org/t/okta-sso-stopped-functioning-after-upgrading-from-v3-02-to-v4-05/94405 "2025-01-06T15:23:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![helenzhang43](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@helenzhang43](https://discourse.nodered.org/u/helenzhang43)\
**Post date:** [6 January 2025 15:23 UTC](https://discourse.nodered.org/t/okta-sso-stopped-functioning-after-upgrading-from-v3-02-to-v4-05/94405/1 "2025-01-06T15:23:16Z")

</div>

After upgrading Node-Red docker image from v3.0.2 to v4.0.5, okta sso login stopped working with an error: **Uncaught TypeError: Cannot read properties of undefined (reading 'substring').** The settings.json file contains the following adminAuth section. Please help if you have any info on this issue.

```auto
 adminAuth: { 
      type:"strategy", 
      strategy: { 
          name: "okta", 
          label: 'Sign in with Okta', 
          icon:"fa-key", 
          strategy: require("passport-okta-oauth").Strategy, 
          options: { 
              audience: 'https://$COMPANY_NAME.okta.com', 
              clientID: '$CLIENT_ID', 
              clientSecret: '$CLIENT_SECRET', 
              scope: ["openid", "email", "profile", "offline_access"], 
              callbackURL: 'https://$NODE_RED_DOMAIN/auth/strategy/callback', 
              verify: function(accessToken, refresh_token, params, profile, done) { 
              const jwt = require("jsonwebtoken"); 
              var decodedToken = jwt.decode(params.id_token); 
              var decodedAccessToken = jwt.decode(params.access_token); 
              console.log(decodedToken); 
              console.log(decodedAccessToken); 
              profile.username = decodedToken.upn; 
              done(null, profile); 
              } 
          }, 
      }, 
      users: function (username){ 
      return Promise.resolve ({username: username, permissions: "*"}); 
    } 
  },

```

The Dockerfile file contains the following lines:

```auto
RUN npm install node-red-contrib-modbus jsonwebtoken
RUN npm install passport passport-okta-oauth passport-azure-ad-oauth2

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 April 2025 15:23 UTC](https://discourse.nodered.org/t/okta-sso-stopped-functioning-after-upgrading-from-v3-02-to-v4-05/94405/2 "2025-04-06T15:23:46Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
