Skip to content
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

Feat: Migrate Auth Process to Farcaster #15

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Conversation

juliopavila
Copy link
Collaborator

Overview

This pull request migrates the authentication process of the application to use Farcaster. The following changes have been made:

  • Integration of Farcaster authentication client and kit.
  • Implementation of FarcasterModal component for user authentication.
  • Updates to context and hooks to support the new authentication flow.
  • Removal of previous Twitter-based authentication.

Changes

  1. Dependencies Added:

    • @farcaster/auth-client: ^0.1.1
    • @farcaster/auth-kit: ^0.3.1
    • viem: ^2.17.0
    • vite-plugin-node-polyfills: ^0.22.0
  2. Component Updates:

    • FarcasterModal.tsx: Added to handle the new authentication flow with Farcaster, including QR code scanning and handling authentication states.
    • Modal.tsx: Modified to accept an optional className prop.
    • NavMenu.tsx: Updated to use user.pfpUrl instead of user.avatar.
  3. Context Changes:

    • VoteManagement.context.tsx and VoteManagement.types.ts: Refactored to replace SocialAuth with Farcaster's StatusAPIResponse and update related state management.
  4. Hook Updates:

    • useEnclaveServer.ts: Removed dependency on the old Twitter model.
    • useSignIn from Farcaster's auth-kit integrated in DailyPoll.tsx.
  5. Pages and Components:

    • DailyPoll.tsx and Landing/components/DailyPoll.tsx: Implemented the new sign-in process using Farcaster.
    • Register.tsx and useTwitter.ts: Removed as they are no longer needed.
  6. Miscellaneous:

    • Added Farcaster styles in globals.css.
    • Updated Vite configuration to include node polyfills.

Testing

  • Ensure the application builds and runs without errors.
  • Test the authentication process by scanning the QR code and verifying the authentication flow.
  • Check for any regressions in the voting process and related components.

Copy link

vercel bot commented Jul 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
crisp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2024 4:02pm

Copy link
Member

@auryn-macmillan auryn-macmillan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@juliopavila juliopavila merged commit 79fb8c0 into main Jul 8, 2024
2 of 3 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.

2 participants