Conversation
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
| /** | ||
| * The revoke token used to revoke refresh token and get new refresh token and new revoke token. | ||
| */ | ||
| revokeToken: string; |
There was a problem hiding this comment.
Missing assertion for required revokeToken in type guard
Medium Severity
revokeToken: string was added as a required field on AuthenticatedUserDetails, but assertIsSeedlessOnboardingUserAuthenticated — which is a type guard (asserts value is AuthenticatedUserDetails) — never validates that revokeToken exists or is a string. After the assertion passes, TypeScript trusts revokeToken is a string, but it can actually be undefined (e.g., authenticate only sets it conditionally via if (revokeToken)). This is inconsistent with metadataAccessToken, which was also newly added to the type but is checked by the assertion.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b676cc5. Configure here.
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1d44681. Configure here.
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |


Explanation
Telegram social login needs to carry a profile-pairing token through seedless onboarding so the same social identity can be linked to profile sync after onboarding completes.
Before this change,
SeedlessOnboardingControllercould authenticate a seedless onboarding user, but it could not persist the Telegram pairing token needed for later profile pairing or submit it to the profile service once onboarding finished. This PR adds Telegram profile-pairing support by:pairProfileServiceWithSocialLogin, which POSTs the storedprofilePairingTokentoprofilePairingEndpointusing a profile-service bearer tokenprofilePairingTokenauthenticateto accept and storeprofilePairingTokenprofilePairingTokenforAuthConnection.Telegramand treating Telegram users without it as unauthenticatedBreaking:
SeedlessOnboardingControllerOptionsnow requiresfetchFunctionandprofilePairingEndpoint.References
SeedlessOnboardingControllermust now providefetchFunctionandprofilePairingEndpoint.Checklist
Note
Medium Risk
Adds a new Telegram-only profile-pairing flow that persists a new token through vault unlock/creation and performs an external HTTP POST, plus a breaking constructor/options change requiring
fetchFunctionandprofilePairingEndpoint.Overview
Adds Telegram support to seedless onboarding by introducing
AuthConnection.Telegram, tracking aprofilePairingTokenthroughauthenticate, vault serialization/deserialization, and unlock/lock flows, and tighteninggetIsUserAuthenticatedrequirements for Telegram users.Introduces
pairProfileServiceWithSocialLogin(messenger-exposed) which POSTs the stored pairing JWT to a configuredprofilePairingEndpointusing an injectedfetchFunction, and records success/failure on the primarySocialBackupsMetadataentry via newprofilePairingStatus/ProfilePairingStatus.Breaking:
SeedlessOnboardingControllerOptionsnow requiresfetchFunctionandprofilePairingEndpoint; assertions/types/tests/changelog are updated accordingly, andeslint-suppressions.jsonremoves a suppression entry forassertions.ts.Reviewed by Cursor Bugbot for commit 95a687a. Bugbot is set up for automated code reviews on this repo. Configure here.