Skip to content

feat: design pluggable authentication architecture (#455)#490

Merged
EDOHWARES merged 1 commit into
SoroLabs:mainfrom
Ceejaytech25:feature/455-pluggable-auth
May 28, 2026
Merged

feat: design pluggable authentication architecture (#455)#490
EDOHWARES merged 1 commit into
SoroLabs:mainfrom
Ceejaytech25:feature/455-pluggable-auth

Conversation

@Ceejaytech25
Copy link
Copy Markdown

Description

Resolves #455

This PR introduces a highly resilient, pluggable authentication architecture designed to seamlessly support multiple authentication mechanisms (OAuth, SAML, DID) while maintaining a unified identity model across the SoroTask platform.

🚀 Key Features & Architectural Changes

  • Unified Identity Manager (IdentityManager.ts): Introduces a normalization layer that takes disparate identity profiles (OAuth subjects, SAML NameIDs, DID addresses) and maps them to our standardized User model with consistent roles and permission handling.
  • Pluggable Auth Pipeline (AuthPipeline.ts): Built a fault-tolerant pipeline that acts as the entry point for authentication requests. It handles dynamic provider registration, request routing, and strict error tracking.
  • Core Providers (providers/):
    • OAuthProvider: Foundation for standard OAuth2 integrations (Google, GitHub, etc.).
    • SAMLProvider: Foundation for enterprise Single Sign-On (SSO) integrations.
    • DIDProvider: Support for Web3/Stellar decentralized identities and cryptographic signatures.
  • Strict Typings (types.ts): Fully typed interfaces for credentials, provider configurations, and authentication results to guarantee strict architectural boundaries.

🛠️ Fixes & Improvements

  • Fixed a pre-existing syntax error in frontend/jest.config.js that was preventing test suites from running properly.

✅ Testing

  • Unit tests written for the entire authentication pipeline, identity resolution, and all providers.
  • Achieved >90% code coverage for the newly introduced src/lib/auth module.

📋 Reviewer Notes

This serves as the foundational backend infrastructure for our new authentication flows. It is currently designed to cleanly integrate into the existing NextAuth configuration or act as a standalone service interface moving forward.

Closes #455
Closes #456

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@Ceejaytech25 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

@Ceejaytech25
Copy link
Copy Markdown
Author

@ayomideadeniran , pls review

@EDOHWARES
Copy link
Copy Markdown
Contributor

@Ceejaytech25 , LGTM!

@EDOHWARES EDOHWARES merged commit 7a198a4 into SoroLabs:main May 28, 2026
0 of 6 checks passed
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.

[Backend] Implement Long-Polling and Webhooks for Legacy Client Support [Backend] Design Pluggable Authentication Architecture

2 participants