Repository navigation
feat: wallet auth lifecycle and cross-tab sync (#27-30) - #167
Merged
Marvell69 merged 1 commit intoOct 18, 2026
Merged
Conversation
Issue OracleDesk#27 - Hardware wallet support: - Document Ledger/Trezor integration via StellarWalletsKit - All wallet modules enabled by default (Freighter, WalletConnect, Ledger, Trezor) - Add comprehensive troubleshooting guide for hardware wallet setup Issue OracleDesk#28 - Cross-tab state sync: - Add cross-tab-sync.ts for BroadcastChannel with storage event fallback - Sync wallet connection, disconnection, and session changes across tabs - Prevent session hijacking when same wallet used in multiple tabs - Integrate sync listener in WalletProvider Issue OracleDesk#29 - JWT lifecycle management: - Add jwt-manager.ts for expiry checking and single-flight re-auth - decodeJWT() safely parses JWT payload without verification - isTokenExpired() checks if token is expired (with 30s buffer) - getTokenTTL() returns milliseconds until expiry - Single-flight re-auth prevents thundering herd on 401 errors - ensureAuthWithSingleFlight() deduplicates concurrent re-auth attempts Issue OracleDesk#30 - SEP-10 validation: - Add sep10-validator.ts for pre-signing challenge validation - validateSEP10Challenge() checks XDR format, network, expiry, signatures - extractChallengeToken() retrieves token from ManageData operation - signInWithWallet() now validates before signing (prevents accidents) Enhanced API client with isAuthError() to detect 401/TOKEN_EXPIRED conditions. Updated auth.ts to integrate all new modules. Updated WalletProvider to use cross-tab sync. Closes OracleDesk#27 Closes OracleDesk#28 Closes OracleDesk#29 Closes OracleDesk#30
|
@EmmanuelOchaje is attempting to deploy a commit to the Marvel's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@EmmanuelOchaje Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Implements comprehensive wallet authentication improvements:
Changes
#27 - Hardware Wallet Support
defaultModules()#28 - Cross-Tab Synchronization
lib/api/cross-tab-sync.tsmodule#29 - JWT Lifecycle Management
lib/api/jwt-manager.tsmoduledecodeJWT()andisTokenExpired()for client-side checksgetTokenTTL()returns milliseconds until expiryensureAuthWithSingleFlight()#30 - SEP-10 Challenge Validation
lib/stellar/sep10-validator.tsmodulevalidateSEP10Challenge()checks before signing:Enhanced API Client
isAuthError()function detects 401/TOKEN_EXPIREDTest Plan
Closes #27
Closes #28
Closes #29
Closes #30