When you authenticate or open the browser simulator using the Visual Studio Code-based
Salesforce CLI Modeler plugin, two login limitations can cause the Proof Key for Code Exchange
(PKCE) authorization-code flow to fail. Configure your org and workspace settings as described
here to ensure successful authentication.
Required Editions
Available in: Lightning Experience
Available in: Enterprise and Unlimited Editions that have Consumer Goods
Cloud enabled.
User Permissions Needed
To update My Domain settings:
Customize Application OR System Administrator
Resolve Cookie Redirection Limitation
When you enable require first-party use of Salesforce cookies in your org, Salesforce inserts
a cross-domain redirect (my.salesforce.com to file.force.com)
during the Modeler login flow. This handoff relies on third-party cookie handling in the
browser, which can fail and return a generic error
(OAUTH_APPROVAL_ERROR_GENERIC, underlying
invalid_grant or expired authorization code).
Follow these steps to resolve this limitation:
From Setup, enter My Domain in the Quick Find box, and select
My Domain.
Under Routing and Policies, locate the Cookies section.
Deselect Require First-Party Use of Salesforce Cookies.
Save your changes.
Resolve Custom Domain Link Limitation
When you start a login or test connection, Modeler opens an authentication popup with a Use
Custom Domain link. If you select this link during authentication, it can pin the authorization
request and token exchange to different hosts and cause the login flow to fail.
Follow these steps to resolve this limitation:
Don't select Use Custom Domain in the login popup.
Instead, configure your org's My Domain in your Modeler workspace configuration file
(config.json): set the sfSubDomainURL property to your
org's My Domain URL.
Save config.json, and authenticate again.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.