Skip to content

feat: use bearer token in requests - #628

Draft
ieow wants to merge 1 commit into
mg/mpc-keyring-revisionfrom
cw/header-token
Draft

feat: use bearer token in requests#628
ieow wants to merge 1 commit into
mg/mpc-keyring-revisionfrom
cw/header-token

Conversation

@ieow

@ieow ieow commented Sep 3, 2026

Copy link
Copy Markdown

Summary

  • MPC cloud HTTP calls now send the profile token in an Authorization: Bearer <token> header instead of including token in JSON request bodies.
  • The shared postJson helper accepts the token as a separate argument and applies it consistently across all MPC backend requests.
  • Token-only endpoints (getNetId, checkKeyShareBackupId, loadKeyShareBackup) still use POST but now send an empty JSON body ({}).

Test plan

  • Run packages/keyring-eth-mpc unit tests (cloud.test.ts)
  • Verify getNetId requests include the Bearer header and send {} as the body
  • Verify sign and backup helpers include the Bearer header and omit token from the JSON payload
  • Confirm MPC backend accepts Bearer authentication for affected endpoints before merge

…s accordingly. This change adds an Authorization header to the postJson function and modifies related functions to pass the token, ensuring secure communication with the MPC backend. Updated tests to verify the presence of the token in requests and validate response structures.
@ieow ieow changed the title Enhance cloud API to include Bearer token in requests and update tests accordingly. This change adds an Authorization header to the postJson function and modifies related functions to pass the token, ensuring secure communication with the MPC backend. Updated tests to verify the presence of the token in requests and validate response structures. feat: use bearer token in requests Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant