Skip to content

feat(mobile): implement wallet-based authentication service with Stel…#150

Open
NueloSE wants to merge 1 commit intoNFTopia-Foundation:mainfrom
NueloSE:feat/wallet-auth-service
Open

feat(mobile): implement wallet-based authentication service with Stel…#150
NueloSE wants to merge 1 commit intoNFTopia-Foundation:mainfrom
NueloSE:feat/wallet-auth-service

Conversation

@NueloSE
Copy link
Copy Markdown
Contributor

@NueloSE NueloSE commented Mar 29, 2026

Summary

  • Add WalletAuthService with full Stellar wallet authentication flow (challenge → sign → verify)
  • Add src/services/auth/types.ts with AuthResponse, ChallengeResponse, LinkWalletResponse, AuthError, and AuthErrorCode types
  • Integrate with existing StellarWalletService for message signing and expo-secure-store for JWT token persistence

Changes

  • src/services/auth/types.ts — wallet auth types and typed error class
  • src/services/auth/walletAuth.service.tsWalletAuthService implementing getChallenge, authenticate, walletLogin, linkWallet, and unlinkWallet
  • src/services/auth/__tests__/walletAuth.service.test.ts — 23 unit tests covering happy paths and error scenarios

API Endpoints Consumed

Endpoint Method
/auth/wallet/challenge POST
/auth/wallet/verify POST
/auth/wallet/link POST
/auth/wallet/unlink DELETE

Test Plan

  • All 23 unit tests pass (./node_modules/.bin/jest src/services/auth/__tests__/walletAuth.service.test.ts)
Screenshot 2026-03-29 at 5 19 28 AM

Closes #114

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@NueloSE 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! 🚀

Learn more about application limits

@Oluwaseyi89
Copy link
Copy Markdown
Contributor

Oluwaseyi89 commented Mar 29, 2026

@NueloSE please resolve the merge conflict. Contact me once done.

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.

Implement wallet-based authentication service that uses Stellar wallet signatures to authenticate with the backend

2 participants