supermemory icon indicating copy to clipboard operation
supermemory copied to clipboard

feat(web): GitHub Login

Open aryasaatvik opened this issue 1 year ago • 5 comments

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 GitHubLogin component for GitHub authentication.
    • Added a new GoogleLogin component for Google authentication.
    • Updated the Signin page to utilize the new login components instead of inline forms.
    • Integrated GitHub provider in the authentication server configuration.
  • New Features:

    • Users can now log in using their GitHub accounts via the newly created GitHubLogin component.
    • The GoogleLogin component allows users to log in with their Google accounts, maintaining existing functionality.
  • Refactoring:

    • The inline form for Google login in the Signin page has been replaced with the GoogleLogin component, promoting reusability and separation of concerns.
    • The signIn function calls have been encapsulated within their respective components, improving readability and maintainability of the codebase.
    • The auth.ts file has been updated to include the GitHub authentication provider, ensuring that the backend supports the new login method.

✨ Generated with love by Kaizen ❤️

Original Description None

aryasaatvik avatar Jul 23 '24 22:07 aryasaatvik

TODO: error handling when a user with the same email has previously logged in using a different provider

aryasaatvik avatar Jul 23 '24 22:07 aryasaatvik

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

Dhravya avatar Jul 23 '24 23:07 Dhravya

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

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

aryasaatvik avatar Jul 24 '24 04:07 aryasaatvik

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

Dhravya avatar Jul 24 '24 05:07 Dhravya

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

kaizen-bot[bot] avatar Jul 24 '24 19:07 kaizen-bot[bot]