stellar-SEP-10
An Express service implementing the Stellar SEP-10 web-authentication handshake: it issues a signed challenge transaction and, once the client returns it signed, verifies it and issues a JWT.
Problem
Authenticate a Stellar account holder to a web service by proving control of their key, following the SEP-10 standard.
Built with
- Node.js
- Express
- stellar-sdk
- JSON Web Tokens
Architecture
SEP-10 handshake
Inferred- GET challenge Server builds a transaction
- Client signature Account holder signs it
- POST challenge Server verifies signatures
- Session JWT Issued after verification
SEP-10 challenge/response
InferredThe two endpoints implement the SEP-10 handshake as specified by the Stellar protocol: GET returns a challenge transaction, POST accepts the signed transaction and returns a session token.
Evidence
GET /sep10/auth builds a challenge transaction with stellar-sdk Utils.buildChallengeTx using the server signing keypair, the client account, the home and web-auth domains, a 5-minute timeout, the network passphrase, and a random memo id.
Verifiedservices/sep10/auth.service.js:8-36controllers/sep10/challenge.js:1-29
POST /sep10/auth verifies the signed challenge with Utils.readChallengeTx, then verifyChallengeTxThreshold against the account's med_threshold and signers loaded from Horizon, falling back to verifyChallengeTxSigners when the account is not found on the network.
VerifiedAfter successful verification the service issues a JWT bound to the client account id, transaction and memo.
VerifiedThe server signing keypair is loaded via Keypair.fromSecret from config and the Horizon Server is constructed from a configured URL.
Verifiedroutes/sep24 and services/index.js are empty placeholder files, and the config keys are misspelled SINGING_SECRET_KEY / SINGING_PUBLIC_KEY.
VerifiedContribution
Sole developer
Owner-confirmed sole work
Owner-confirmed: sole, original work using the stellar-sdk Utils helpers rather than a copied reference implementation. Express service implementing Stellar SEP-10 web authentication end-to-end (challenge, verification against Horizon signers/thresholds, JWT issuance).