feat: Privy Authentication Enhancements (Issues #612, #614, #615, #616) - #722
Merged
Akatenvictor merged 1 commit intoSep 29, 2026
Conversation
Closes AudioBitsStellar#612, Closes AudioBitsStellar#614, Closes AudioBitsStellar#615, Closes AudioBitsStellar#616 - Issue AudioBitsStellar#612: Add support for embedded wallet creation on signup * Webhook handler for user.created events * Automatic embedded wallet linking during account creation * Default listener role assignment for new signups - Issue AudioBitsStellar#614: Add Stellar wallet linking through Privy * Webhook handler for user.linked_account events * Stellar wallet detection (chain_type=stellar, address starts with G) * stellarPublicKey field population for royalty payments * Support for external wallet connections (MetaMask, WalletConnect) - Issue AudioBitsStellar#615: Implement role-based access control on Privy identity * RolePermissions mapping for listener, artist, moderator, admin * requireRoles middleware factory for route protection * requirePermissions middleware for fine-grained access control * Helper functions: hasPermission, hasRole, canAccessResource * Convenience middlewares: requireArtist, requireAdmin, etc. * Full integration with both legacy JWT and Privy auth - Issue AudioBitsStellar#616: Implement artist vs listener account type distinction * AccountTypeService for role management * Account type selection during signup * Listener to artist upgrade flow * Downgrade protection when content exists * Dedicated API endpoints for account type management * Integration with RBAC permissions system Additional improvements: - Privy webhook signature verification (HMAC-SHA256) - Comprehensive test coverage for RBAC and account types - Documentation for account types and webhook integration - Support for social logins (Twitter, Google) via webhooks - Audit logging for all account type changes
|
@coding-may 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
This PR implements four interconnected Privy authentication features that enhance the AudioBlock authentication system.
Closes #612, Closes #614, Closes #615, Closes #616
Issues Addressed
Key Features
🔐 Issue #612: Embedded Wallet Creation
🌌 Issue #614: Stellar Wallet Linking
🛡️ Issue #615: Role-Based Access Control
👤 Issue #616: Artist vs Listener Account Type
Documentation
Testing
Security