User email/phone replacement endpoints added; request body consumption fixed
@clerk/backend@3.5.0
Minor Changes
- Add support for new Backend API user endpoints: (#8694) by @dmoerner
users.replaceUserEmailAddress(userId, { emailAddress })replaces all of a user's email addresses with a single verified, primary email address (PUT /users/{user_id}/email_address).users.replaceUserPhoneNumber(userId, { phoneNumber })replaces all of a user's phone numbers with a single verified, primary phone number (PUT /users/{user_id}/phone_number).users.createUsernow acceptsbannedandlockedparameters to create a user that is already banned or locked.
Patch Changes
-
Emit the "session token from cookie is missing the
azpclaim" warning once per process instead of on every authenticated request. Anazp-less cookie token is reused across requests, so the previous unguardedconsole.warncould flood production logs. (#8698) by @jacekradko -
Stop
authenticateRequestfrom consuming the incoming request body, which previously left downstream handlers unable to read it (for example a Hono POST route callingc.req.json()). (#8708) by @jacekradko -
Prevent keyless mode from activating in CI and other automated environments in framework SDKs. (#8676) by @mwickett
-
Preserve custom claims when verifying JWT-format M2M tokens.
M2MToken.fromJwtPayloadpreviously hardcodedclaimstonull, soclient.m2m.verify()(and request-levelauth()) dropped any custom claims embedded in the token. Custom claims are now reconstructed from the verified payload by stripping only the structural claims the backend adds when minting the token (iss,sub,exp,nbf,iat,jti). User-supplied claims such asaudare preserved. Tokens without custom claims still returnclaims: null, consistent with the opaque-token path. (#8697) by @jacekradko -
Strip
private_metadatafrom the backend resource_rawpayload instripPrivateDataFromObject, preventing it from leaking into__clerk_ssr_statewhen aUser/Organizationresource is passed tobuildClerkProps. (#8702) by @dominic-clerk -
Updated dependencies [
afb75e6,c3df67a,86fd38f,8d6bb56,43dfefa,5fc7b21,c2ba134]:- @clerk/shared@4.15.0
Fetched June 3, 2026


