@salesforce/b2c-tooling-sdk / clients / withScopes
Function: withScopes()
withScopes(
auth,additionalScopes):AuthStrategy
Defined in: packages/b2c-tooling-sdk/src/clients/scapi-backend-utils.ts:66
Returns a copy of auth with additionalScopes merged in, or the original auth if the strategy doesn't support scope merging (e.g., basic/api-key auth, or a stored-session strategy where scopes were fixed at acquisition).
Centralized so SCAPI client factories don't have to keep extending an instanceof chain as new OAuth strategy types are added.
Parameters
auth
additionalScopes
string[]