Loading

Refresh Token Rotation Enforced and Password Grants Disabled in Account Manager for B2C Commerce

Data pubblicazione: Nov 11, 2026
Descrizione

Salesforce is aligning Account Manager with the OAuth 2.0 Security Best Current Practice (BCP) to reduce the risk of stolen tokens and exposed user credentials. The changes apply to all clients.

Changes at a Glance

ChangeCurrent BehaviorBehavior From April 7, 2027Who Is Affected
Refresh Token RotationDisabledEnforced for all clients that hold refresh tokensClients using authorization_code, direct grant, or offline_access
Implicit flowBlocked for public clients onlyBlocked for all clientsClients using response_type=token or id_token
ROPC (password grant)Blocked for public clients onlyBlocked for all clientsClients using grant_type=password

 

Change 1: Refresh Token Rotation (RTR)

Background

Currently, Account Manager does not rotate refresh tokens. A stolen refresh token can therefore be reused until it expires. Starting April 7, 2027, rotation is mandatory.

 

Behavior Changes

  • Single-use tokens: Each token refresh request invalidates the previous refresh token. Account Manager returns a new refresh token with the new access token.
  • Reuse grace period: Account Manager applies a short grace period of [duration to be confirmed] so that benign concurrent requests, such as multi-tab browser applications or mobile network retries, do not cause an accidental sign-out.
  • Session revocation: If a rotated refresh token is presented again after the grace period, Account Manager treats the request as a possible breach. It invalidates the entire authorization grant and the associated session, and returns the invalid_grant error.

 

Impacted Clients

  • Applications that use the authorization_code flow, the direct grant flow, or the offline_access scope and hold refresh tokens.
  • Multi-tab single-page applications (SPAs), mobile applications, and asynchronous microservices that do not serialize refresh calls.
  • Clients that use client_credentials do not hold refresh tokens and are not affected.

 

Required Actions

  1. Store the new refresh token immediately after every token response. The previous token is no longer valid, so losing the new token ends the session.
  2. Serialize refresh requests, or handle single-use rotation, in client code. Parallel refreshes outside the grace period trigger session revocation.
  3. Catch invalid_grant errors and prompt the user, or the background service, to authenticate again. This is the expected outcome when a session is revoked.

 

Example Scenario

A merchant runs a Business Manager-style admin tool as a single-page application. The user opens the tool in two browser tabs, and both tabs refresh the token at the same moment. Before April 7, 2027, both requests succeed. After the change, the second request presents a token that was already rotated. If it arrives outside the grace period, Account Manager revokes the session and returns invalid_grant, and the user must sign in again. A shared token-refresh routine that sends one refresh request at a time avoids this.

 

Change 2: Disable the OAuth 2.0 Implicit Flow

Background

The Implicit flow (response_type=token, id_token, or token id_token) returns access tokens directly in the redirect URL fragment, where browser history, logs, or scripts can expose them. The OAuth 2.0 Security BCP deprecates it and OAuth 2.1 removes it. Commerce Cloud Account Manager currently blocks it for public clients. On April 7, 2027, it blocks it for all clients, including confidential clients.

 

Behavior Changes

  • Endpoint enforcement: Authorization requests to /oauth2/authorize that use implicit response types, including hybrid combinations, are rejected for all clients.
  • Error response: Rejected requests return the error code unsupported_response_type.

 

Impacted Clients

  • Legacy web applications, SPAs, and integrations that request tokens through browser redirects with response_type=token or response_type=id_token.

 

Required Actions

  • Migrate to the Authorization Code flow with Proof Key for Code Exchange (PKCE) using a public API client. PKCE protects the code exchange without a client secret, so no secret is shared with the browser or client application.

 

Change 3: Disable the Resource Owner Password Credentials (ROPC) Grant

Background

The ROPC flow (grant_type=password) exchanges a user's username and password directly for tokens. Client applications must handle raw user credentials, and the flow bypasses multi-factor authentication (MFA), passkeys, and phishing-resistant login. The OAuth 2.0 Security BCP prohibits it. Account Manager currently blocks it for public clients. On April 7, 2027, it blocks it for all client types.

 

Behavior Changes

  • Endpoint enforcement: Token requests to /oauth2/token with grant_type=password are rejected by the server.
  • Error response: Account Manager returns a spec-compliant error: unauthorized_client or unsupported_grant_type [exact code to be confirmed].

 

Impacted Clients

  • Client applications, mobile apps, scripts, and backend services that pass a username and password to obtain OAuth tokens.

 

Required Actions

  • User-interactive applications: Migrate to the Authorization Code flow with PKCE so users sign in on the Account Manager login page and MFA applies.
  • Machine-to-machine and service integrations: Migrate to the Client Credentials flow (grant_type=client_credentials). A background process has no user to sign in, so it authenticates as the API client.
Risoluzione

Complete the following before April 7, 2027 to keep Commerce Cloud Account Manager integrations working:

  1. Audit all Account Manager API clients and integrations for refresh token handling, response_type=token or id_token usage, and grant_type=password usage. The audit shows which of the three changes affects each integration.
  2. Update refresh token handling so every integration stores the new refresh token after each refresh and sends refresh requests one at a time. This prevents session revocation under Refresh Token Rotation.
  3. Move any Implicit flow or ROPC integration to the Authorization Code flow with PKCE (user-facing apps) or the Client Credentials flow (machine-to-machine). These flows are the supported replacements and keep credentials and tokens out of browser URLs.
  4. Test each updated integration and confirm it handles invalid_grant by prompting for a new sign-in.
Numero articolo Knowledge

005461459

 
Caricamento
Salesforce Help | Article