FreshDesk Custom APP - OAuth popup window errors and gets stuck

We are using OAuth in our custom App. The App when loaded correctly displays “Authorize” button, and opens the idp login screen in a popup when clicked. But after the user logs in, the popup window gets stuck in the callback url (https://oauth.freshdev.io/auth/callback). In the console following error is seen.

Looks like same issue as this - https://stackoverflow.com/questions/7120534/window-opener-is-null-after-redirect

Any solutions?

Platform Version: 2.3
Node v18.18.0 using FDK 9.0.5
Authentication works fine in the Dev mode (ie when ran locally), issue is only when installed.

Hey @sudev_krishnan,
Welcome to the Freshworks Developer Community! :tada:

Can you please share the manifest.json and oauth_configs.json without the credentials?

Is this in a specific browser or across Chrome/Firefox/Safari?

1 Like

Thanks for the reply @zach_jones_noel . Details below,

Manifest file=>

{
  "platform-version": "2.3",
  "product": {
    "freshdesk": {
      "location": {
        "ticket_sidebar": {
          "url": "index.html",
          "icon": "icon.svg"
        }
      },
      "requests": {
        "graphQL": {}
      }
    }
  },
  "engines": {
    "node": "18.18.2",
    "fdk": "9.0.5"
  }
}

oauth_config.json =>

{
  
    "client_id": "<%= oauth_iparams.liively_iam_client_id %>",
    "client_secret": "<%= oauth_iparams.liively_iam_client_secret %>",
    "oauth_iparams": {
        "liively_iam_client_id": {
          "display_name": "Client ID",
          "description": "Cognito Client ID",
          "type": "text",
          "required": true,
     
          "visible": true
        },
        "liively_iam_client_secret": {
            "display_name": "Client Secret",
            "type": "text",
            "required": true,
            "description": "Cognito Client Secret",
            "visible": true
          },
          "iamauthurl": {
            "display_name": "Auth URL",
            "description": "Cognito Auth URL",
            "type": "text",
            "required": true,
            
            "visible": true
          },
          "liively_iam_token_url": {
            "display_name": "Token URL",
            "description": "Cognito Token URL",
            "type": "text",
            "required": true,
         
            "visible": true
          }
      },
    "authorize_url": "<%= oauth_iparams.iamauthurl %>",
    "token_url": "<%= oauth_iparams.liively_iam_token_url %>",
    "options": {
        "access_type": "offline",
        "prompt": "consent"
    },
    "token_type": "agent"
}

Able to replicate the issue on both Chrome and Firefox. Unable to verify in Safari as of now.
Also - This working well until few days back, and no code changes after that.

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