feat(web): GitHub Login
feat(web): GitHub Login
Overview
This pull request introduces GitHub login functionality to the web application, enhancing the authentication options available to users. It also refactors the existing Google login implementation to improve code organization and maintainability.
Changes
-
Key Changes:
- Added a new
GitHubLogincomponent for GitHub authentication. - Added a new
GoogleLogincomponent for Google authentication. - Updated the
Signinpage to utilize the new login components instead of inline forms. - Integrated GitHub provider in the authentication server configuration.
- Added a new
-
New Features:
- Users can now log in using their GitHub accounts via the newly created
GitHubLogincomponent. - The
GoogleLogincomponent allows users to log in with their Google accounts, maintaining existing functionality.
- Users can now log in using their GitHub accounts via the newly created
-
Refactoring:
- The inline form for Google login in the
Signinpage has been replaced with theGoogleLogincomponent, promoting reusability and separation of concerns. - The
signInfunction calls have been encapsulated within their respective components, improving readability and maintainability of the codebase. - The
auth.tsfile has been updated to include the GitHub authentication provider, ensuring that the backend supports the new login method.
- The inline form for Google login in the
✨ Generated with love by Kaizen ❤️
Original Description
None
TODO: error handling when a user with the same email has previously logged in using a different provider
Great, love it
this would certainly break parts of the app though. for eg. the ensureAuth function that is compatible with the mobile app (coming soon) login
https://github.com/supermemoryai/supermemory/blob/deb86ecd07df681c72828c3ae01414959d09eb23/apps/web/app/api/ensureAuth.ts#L19-L54
Great, love it
this would certainly break parts of the app though. for eg. the
ensureAuthfunction that is compatible with the mobile app (coming soon) loginhttps://github.com/supermemoryai/supermemory/blob/deb86ecd07df681c72828c3ae01414959d09eb23/apps/web/app/api/ensureAuth.ts#L19-L54
@Dhravya I can add the same logic for github api. But the logic for creating a user on mobile https://github.com/supermemoryai/supermemory/blob/main/apps/web/app/api/ensureAuth.ts#L80 doesn't seem correct. It is missing adding a row account table. Can I take a look at the mobile app? Is it in RN?
eh, yeah that logic is probably broken right now it works but i haven't put much thought into it
yes it is RN code will be out soon next week
Code Review
✅ All Clear: This PR is ready to merge! 👍
✨ Generated with love by Kaizen ❤️
Useful Commands
-
Feedback: Reply with
!feedback [your message] -
Review: Reply with
!review