Skip to content

Support Username/Password OAuth Flow#780

Merged
cwarden merged 1 commit intoForceCLI:masterfrom
cwarden:oauth-username-password
May 8, 2026
Merged

Support Username/Password OAuth Flow#780
cwarden merged 1 commit intoForceCLI:masterfrom
cwarden:oauth-username-password

Conversation

@cwarden
Copy link
Copy Markdown
Member

@cwarden cwarden commented May 8, 2026

Adds an OAuth Username/Password grant type alongside the existing SOAP
login, since SOAP login will no longer be supported after Summer '27.

When --user is provided, the login command now selects between two flows:

  • OAuth Username/Password flow when --connected-app-client-secret is
    set. The client secret is included in the token request alongside
    the client id, username, and password.

  • SOAP login otherwise (preserving prior behavior). A deprecation
    warning is written to stderr indicating SOAP login will be removed
    after Summer '27 and pointing users to --connected-app-client-id /
    --connected-app-client-secret for the OAuth flow.

When the OAuth password flow returns invalid_grant / "authentication
failure", append a hint to the error noting that only Connected Apps
support the username/password flow; External Client Apps do not.

Add an OAuth Username/Password grant type alongside the existing SOAP
login since SOAP login will no longer be supported after Summer '27.

When --user and --password are provided, the login command now selects
between two flows:

  - OAuth Username/Password flow when --connected-app-client-secret is
    set. The client secret is included in the token request alongside
    the client id, username, and password.

  - SOAP login otherwise (preserving prior behavior). A deprecation
    warning is written to stderr indicating SOAP login will be removed
    after Summer '27 and pointing users to --connected-app-client-id /
    --connected-app-client-secret for the OAuth flow.

When the OAuth password flow returns invalid_grant / "authentication
failure", append a hint to the error noting that only Connected Apps
support the username/password flow; External Client Apps do not.
@cwarden cwarden force-pushed the oauth-username-password branch from 4717003 to e8790f7 Compare May 8, 2026 16:02
@cwarden cwarden merged commit 07f91cf into ForceCLI:master May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant