-
-
Notifications
You must be signed in to change notification settings - Fork 253
refactor: isolate auth module using inversion of control #584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Create a standalone auth module at ~/auth that encapsulates all authentication logic, making it independent of the rest of the application through IoC interfaces. New auth module structure: - types.ts: Core types and IoC interfaces (IUserRepository, etc.) - session.server.ts: Cookie-based session management with HMAC-SHA256 - auth.server.ts: Main AuthService for user authentication - capabilities.server.ts: CapabilitiesService with helper utilities - oauth.server.ts: OAuthService and OAuth provider utilities - guards.server.ts: Auth guards factory and decorators - repositories.server.ts: Drizzle-based repository implementations - context.server.ts: Dependency injection/service composition root - index.server.ts: Server-side public API exports - index.ts: Client-side public API exports - client.ts: Client-side auth utilities The existing utils files now delegate to the new auth module for backward compatibility. Auth routes updated to use the new module directly.
✅ Deploy Preview for tanstack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
* book icon update * fix book icon * update command icon * replace react-icons/bs * migrate to close icons to lucide-react x * discord, close, and github icons plus some others * update icons to lucide-react for improved consistency * replace FaBolt with Zap icon in multiple components for consistency * replace FontAwesome icons with Lucide icons for consistency * add CheckCircleIcon component and replace FaCheckCircle usage for consistency * remove unused FontAwesome icons for improved consistency * replace FaCogs with CogsIcon component for consistency across multiple files * replace FaComment with MessageSquare icon for consistency across multiple components * replace FontAwesome icons with Lucide icons for consistency across multiple components * replace FaExternalLinkAlt and FaEdit with ExternalLink and SquarePen icons for consistency across multiple components * replace FontAwesome icons with Lucide icons for consistency across multiple components * replace icons with Lucide icons for consistency across multiple components * replace icons with Lucide icons for consistency across multiple components * auth logs * update icons * add BrandXIcon and BSkyIcon components; update Navbar to use new icons * replace Material Design icons with Lucide icons for consistency across multiple components * replace react-icons with Lucide icons * replace react-icons with Lucide icons * ci: apply automated fixes * fix broken icon * enable lazy loading and async decoding for images in Markdown component --------- Co-authored-by: Tanner Linsley <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Create a standalone auth module at ~/auth that encapsulates all authentication logic, making it independent of the rest of the application through IoC interfaces. New auth module structure: - types.ts: Core types and IoC interfaces (IUserRepository, etc.) - session.server.ts: Cookie-based session management with HMAC-SHA256 - auth.server.ts: Main AuthService for user authentication - capabilities.server.ts: CapabilitiesService with helper utilities - oauth.server.ts: OAuthService and OAuth provider utilities - guards.server.ts: Auth guards factory and decorators - repositories.server.ts: Drizzle-based repository implementations - context.server.ts: Dependency injection/service composition root - index.server.ts: Server-side public API exports - index.ts: Client-side public API exports - client.ts: Client-side auth utilities The existing utils files now delegate to the new auth module for backward compatibility. Auth routes updated to use the new module directly.
….com/TanStack/tanstack.com into claude/refactor-auth-isolation-1ODhp # Conflicts: # src/auth/oauth.server.ts
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.

Create a standalone auth module at ~/auth that encapsulates all
authentication logic, making it independent of the rest of the
application through IoC interfaces.
New auth module structure:
The existing utils files now delegate to the new auth module for
backward compatibility. Auth routes updated to use the new module
directly.