Authorize Oath Org Fails with Invalid request method: OPTIONS

Issue #2540 resolved
Brett Nelson created an issue

When using the Authorize Oath Org it opens the login and redirects to a `http://localhost:1717/OauthRedirect?

In WebStorm a modal pops up with the following message:

Failed to authorize org.
Status: 1
Name: invalidRequestMethod
Message: Invalid request method: OPTIONS

Comments (5)

  1. Scott Wells repo owner
    • changed status to open

    That would likely be an issue with the local Salesforce CLI install as all that IC2 is doing is running the CLI command to create a new OAuth connection via Web login.

    You can almost certainly reproduce the issue in isolation of IC2 by executing the same command from the command-line. If you'd like to see the exact command IC2 is running, you can enable Salesforce CLI command logging in Illuminated Cloud | Configure Application | Salesforce DX. Then you can reproduce the behavior from within IC2 and check the Messages tool window for the exact command that was executed. Execute that same command from the CLI and I'm guessing you'll see the same behavior.

    I would recommend performing a complete CLI uninstall/reinstall, making sure to clean out all of the cruft of the old installed as documented here:

    https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm

    If you still see the issue after that doing that and it's only present from within IC2 and not from when executed directly from the command-line, please let me know.

  2. Scott Wells repo owner

    I'm going to resolve this assuming that the previous comment holds true, but if it doesn't, please reopen with additional details and I'll take a look.

  3. Brett Nelson reporter

    Thanks, I was able to get it working again by uninstalling the CLI and installing the next version, 2.35.5. Previous versions had the same issue.

  4. Scott Wells repo owner

    Wow, that’s strange. And you were able to reproduce it outside of IC as well? If so, it might be worth letting Shane M. or someone know about that. I wouldn’t expect you to have to install an as-yet-unreleased version, but perhaps you’re hitting an infrequent bug that is explicitly addressed by that next version.

  5. Log in to comment