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: Integration of Discord and Farcaster for Authentication #14

Closed
wants to merge 3 commits into from

Conversation

juliopavila
Copy link
Collaborator

Overview

This PR introduces Discord and Farcaster as methods for authentication in our web application, ensuring enhanced security and a streamlined user experience. By leveraging these platforms, we enable single-sign-on capabilities, allowing users to vote securely and ensuring that each user can only vote once. The authentication tokens provided have a lifespan of 30 days, offering users continuous access without frequent logins.

Details of Implementation

  • Key Libraries Added:
    • @dynamic-labs/sdk-react-core: Utilized for integrating Farcaster authentication smoothly within our React components.
  • Environment Changes:
    • Updated .env.example to include VITE_DYNAMIC_ENV_ID to configure the Dynamic environment.
  • Major Changes:
    • Added authentication context providers for both Discord and Farcaster in the NavMenu and other relevant components.
    • Ensured that user credentials are verified through OAuth to maintain security and integrity.
    • Updated state management to handle new authentication flow and token lifecycle.

Key File Changes

  1. Environment Configuration:
    • packages/client/.env.example: Added environment variable for Dynamic ID.
  2. Package Dependencies:
    • packages/client/package.json: Introduced @dynamic-labs/sdk-react-core for handling Farcaster-specific logic.
  3. Authentication Handling:
    • packages/client/src/components/NavMenu.tsx: Integrated use of useDynamicContext for user authentication status and management.
    • packages/client/src/main.tsx: Wrapped application root with DynamicContextProvider to manage environment settings and error debugging.
  4. Voting Mechanism Updates:
    • packages/client/src/pages/DailyPoll/DailyPoll.tsx: Adjusted voting logic to accommodate new authentication methods and ensure secure vote encryption and transmission.

Copy link

vercel bot commented Jul 3, 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 3, 2024 6:48pm

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.

1 participant