Skip to content

Forward OAuth MFA login throttling events with retry details - #1139

Merged
jerry-payward merged 2 commits into
masterfrom
bug/oauth2/343/forward-mfa-login-throttled
Nov 11, 2026
Merged

jerry-payward merged 2 commits into
masterfrom
bug/oauth2/343/forward-mfa-login-throttled

Conversation

@josh-payward

@josh-payward josh-payward commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📦 Pull Request

Headless OAuth MFA throttling events from the iframe currently never reach integrators. Add a typed OAuthMFAEventOnReceived.LoginThrottled event and forward its { retryAfterSeconds: number } payload through both loginWithPopup() and getRedirectResult() when the MFA modal is disabled.

The existing promise handling propagates the companion wallet's RPC rejection (-10035, with data.retryAfterSeconds).

✅ Fixed Issues

  • Addresses WAL-343 together with embedded-wallet #613. Deploy the wallet change before merging/releasing this SDK change so the payload and terminal rejection are available first.

🚨 Test instructions

  • PKG=@magic-ext/oauth2 yarn build passed, including the @magic-sdk/types and provider dependencies and declaration generation.
  • ESLint and TypeScript checks passed for both @magic-sdk/types and @magic-ext/oauth2 on Node 22.23.4.
  • A local runtime harness against the built bundles passed 12 cases covering popup/redirect, showMfaModal false/true/omitted, and nonzero/zero delays. It verified event forwarding, payload identity, and propagation of the -10035 rejection with retry data. This harness is not a new checked-in OAuth test suite.
  • Integration check after the wallet deploy: trigger throttled MFA with showMfaModal: false, observe login-throttled with the retry delay, and catch the rejected popup or redirect-result promise. A live OAuth login was not exercised locally.

Release

Apply minor for the new public event. Versions are managed by auto on merge.

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @magic-ext/bitcoin@29.5.0-canary.1139.42927725889.0
npm install @magic-ext/cosmos@28.13.0-canary.1139.42927725889.0
npm install @magic-ext/evm@1.12.0-canary.1139.42927725889.0
npm install @magic-ext/farcaster@5.13.0-canary.1139.42927725889.0
npm install @magic-ext/gdkms@16.13.0-canary.1139.42927725889.0
npm install @magic-ext/hedera@2.12.0-canary.1139.42927725889.0
npm install @magic-ext/oauth2@15.15.0-canary.1139.42927725889.0
npm install @magic-ext/passkey@1.8.0-canary.1139.42927725889.0
npm install @magic-ext/react-native-bare-oauth@30.14.0-canary.1139.42927725889.0
npm install @magic-ext/react-native-expo-oauth@30.14.0-canary.1139.42927725889.0
npm install @magic-ext/siwe@3.13.0-canary.1139.42927725889.0
npm install @magic-ext/smart-account@1.8.0-canary.1139.42927725889.0
npm install @magic-ext/solana@30.13.0-canary.1139.42927725889.0
npm install @magic-ext/wallet-kit@0.18.0-canary.1139.42927725889.0
npm install @magic-ext/webauthn@27.13.0-canary.1139.42927725889.0
npm install @magic-sdk/provider@33.14.0-canary.1139.42927725889.0
npm install @magic-sdk/react-native-bare@34.13.0-canary.1139.42927725889.0
npm install @magic-sdk/react-native-expo@34.13.0-canary.1139.42927725889.0
npm install @magic-sdk/types@27.14.0-canary.1139.42927725889.0
npm install magic-sdk@33.14.0-canary.1139.42927725889.0
# or 
yarn add @magic-ext/bitcoin@29.5.0-canary.1139.42927725889.0
yarn add @magic-ext/cosmos@28.13.0-canary.1139.42927725889.0
yarn add @magic-ext/evm@1.12.0-canary.1139.42927725889.0
yarn add @magic-ext/farcaster@5.13.0-canary.1139.42927725889.0
yarn add @magic-ext/gdkms@16.13.0-canary.1139.42927725889.0
yarn add @magic-ext/hedera@2.12.0-canary.1139.42927725889.0
yarn add @magic-ext/oauth2@15.15.0-canary.1139.42927725889.0
yarn add @magic-ext/passkey@1.8.0-canary.1139.42927725889.0
yarn add @magic-ext/react-native-bare-oauth@30.14.0-canary.1139.42927725889.0
yarn add @magic-ext/react-native-expo-oauth@30.14.0-canary.1139.42927725889.0
yarn add @magic-ext/siwe@3.13.0-canary.1139.42927725889.0
yarn add @magic-ext/smart-account@1.8.0-canary.1139.42927725889.0
yarn add @magic-ext/solana@30.13.0-canary.1139.42927725889.0
yarn add @magic-ext/wallet-kit@0.18.0-canary.1139.42927725889.0
yarn add @magic-ext/webauthn@27.13.0-canary.1139.42927725889.0
yarn add @magic-sdk/provider@33.14.0-canary.1139.42927725889.0
yarn add @magic-sdk/react-native-bare@34.13.0-canary.1139.42927725889.0
yarn add @magic-sdk/react-native-expo@34.13.0-canary.1139.42927725889.0
yarn add @magic-sdk/types@27.14.0-canary.1139.42927725889.0
yarn add magic-sdk@33.14.0-canary.1139.42927725889.0

@josh-payward josh-payward added the minor Increment the minor version when merged label Nov 10, 2026
@josh-payward
josh-payward marked this pull request as ready for review November 11, 2026 01:40
@jerry-payward
jerry-payward added this pull request to the merge queue Nov 11, 2026
Merged via the queue into master with commit 762704e Nov 11, 2026
11 checks passed
@jerry-payward
jerry-payward deleted the bug/oauth2/343/forward-mfa-login-throttled branch November 11, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants