function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike ArthurMike Arthur 

OAuth Error when attempting to Deploy the ApexMocks open source library in Trailhead unit 'Apply Unit of Work Principles in Apex'

I'm logged in to Trailhead as myself and working on this unit:

Scroll to 'Preparation for the Challenges'
Click on 'Deploy to Salesforce' under 'Deploy the ApexMocks open source library'
That takes me to this page

Click on 'Login to Salesforce'
That gives me this page

"We can't authorize you because of an OAuth error. For more information, contact your Salesforce administrator.
1800 : There was a problem in setting up your remote access"

The first time I tried it I hadn't launched Trailhead Playground so the login url above had the domain of my Trailhead login.
I launched Trailhead Playground and the login url then had the domain of my Trailhead Playground.

I have seen other similar questions but no conclusive explanation. I have tried it on my regular computer and also on another that has never been used for Trailhead or Salesforce before.

Any suggestions?
NagendraNagendra (Salesforce Developers) 
Hi Mike,

This is usually caused by some sort of configuration problem in the org you're using, and nothing to do with your computer. Try creating a new trailhead org and start fresh. There's a number of reasons why this could have happened, perhaps if you set up IP restrictions, blocked the app in the org, disabled permissions for installing new connected apps, etc. A default org should have none of these problems, while a trailhead org you've used for other trails (particularly anything involving security), you may have set one or more configurations that would block access to the installer. You might also want to check your login history on the user detail page, as that may provide additional information about the error if you're really determined to try and fix the problem.

Still, if the problem persists then I would suggest you please log a case with trailhead support team for a better and quick assistance on the above issue.

You may reach the support team at the below email address.
Hope this helps.

Kindly mark this as solved if the reply was helpful.