fix(provider-auth): send ppPublicKey in SEP-10 verify - #42
Merged
Conversation
provider-platform #110 made SEP-10 verify PP-aware: POST /api/v1/stellar/auth
now requires `ppPublicKey` and returns per-PP entityStatus. getProviderJwt
posted only { signedChallenge }, so the provider rejected every call with
400 'Invalid payload - [ppPublicKey] Required' — instant payments never
settled (POS hung on 'Processing payment...').
- getProviderJwt(ppUrl, ppPublicKey, deps): thread the PP key through and
include it in the verify body.
- JWTs are now PP-scoped, so cache by `${ppUrl}|${ppPublicKey}` instead of
ppUrl alone.
- callers (instant-execute, instant-submit) pass pp.publicKey (already in
scope for the entity/bundles URL).
version: 0.5.23 -> 0.5.24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every instant payment failed at the provider auth step — POS hung on "Processing payment…" — with the backend logging:
provider-platform #110 ("PP-aware SEP-10 verify") made
POST /api/v1/stellar/authrequireppPublicKeyin the body (it scopes the issued JWT +entityStatusto that PP).getProviderJwtstill posted only{ signedChallenge }, so the provider rejected it. Pre-existing — the provider has required this since #110; pay-platform was never updated.Fix
getProviderJwt(ppUrl, ppPublicKey, deps)— thread the PP key through and include it in the verify body.ppUrlto${ppUrl}|${ppPublicKey}(a token minted for one PP must not be reused for another served by the same provider URL).instant-execute,instant-submit) passpp.publicKey, already in scope for theentity/bundlesURL.Verification
deno fmt --check/deno lint/deno check src/main.ts/deno task test:unit→ 27 passed, 0 failed.version: 0.5.23 → 0.5.24.