Skip to content

Finalize farcaster support - #57

Draft
L03TJ3 wants to merge 8 commits into
mainfrom
finalize-farcaster-support
Draft

Finalize farcaster support#57
L03TJ3 wants to merge 8 commits into
mainfrom
finalize-farcaster-support

Conversation

@L03TJ3

@L03TJ3 L03TJ3 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Following original implementation with finalization fixes and QA review.

currently resolved:

  • localized yarn version mismatches
  • not triggering needed sdk activation when access through mobile app

L03TJ3 and others added 2 commits July 14, 2026 18:51
#14)

* Feat: Installed farcaster package

* fix: build errors

* feat: Add Farcaster miniapp support for identity flow with build fixes

* rm eslintrc

* refactor: Address code review feedback with improved architecture across utilities

* fix: Address code review complaints

* fix: working on resolving the reviews made

* fix: removed dynamic import, and reverted some configs to the default and added farcaster/miniapp-sdk as dependency to citizen-sdk

* pulled update

* fix: Addressed all outstanding code review feedback.

* fix: resolved all code changes requested

* feat: implement shared build config utility for Node.js built-ins and also created packages/build-config/index.ts with dynamic Node.js built-ins generation

* revert: removed the shared build config changes and other changes

* fc:frame meta tag

* fix: refined the codebase

* fix:patching up the codebase

* Revert "fix:patching up the codebase"

This reverts commit 8616d89.

* revert: reverted all changes requested

* revert: reverted all changes requested

* revert: reverted all changes requested

* fix: revert changes requested

* fix: revert changes requested

* fix: revert changes affecting mobile

* feat: implemented the universal link using farcaster docs

* fix: resolving previous issues

* fix: resolved redirection concerns and fixed bugs

* fix: build id working well now

* fix: remove the unused interface of VerifyButtonProps

* fix: removed the used import { createUniversalLinkCallback } from ../utils/auth

* fix: revert apps/demo-identity-app/src/App.tsx and verifybutton.tsx to original state

* fix: update auth.ts to use chainConfigs instead of contractAddresses

After merging upstream/main, the contract address structure changed from
contractAddresses to chainConfigs. Updated isAddressWhitelisted function
to use the new chainConfigs structure.

* refactor: apply engineering principles to Farcaster implementation

- Remove excessive console.log statements from auth utilities and SDKs
- Simplify error handling by removing redundant try-catch blocks
- Remove verbose JSDoc comments that state the obvious
- Consolidate duplicate navigation functions
- Improve code readability and maintainability
- Follow KISS, DRY, and clarity over cleverness principles

* refactor: clean up demo app following engineering principles

- Remove unnecessary console.log/console.error statements
- Remove unused onVerificationSuccess prop from VerifyButton
- Simplify error handling in demo components
- Rename callBackExample to txConfirm for clarity
- Follow DRY and KISS principles

* fix: address code review feedback

- Restore original fvRedirect behavior in ClaimSDK (window.location.href)
- Use fvDefaultChain instead of hardcoded chainId
- Restore error handling in submitAndWait
- Restore removed JSDoc comments
- Remove unused handleVerificationResponse functions
- Fix VerifyButton error handling
- Add FarcasterAppConfigs documentation to README
- Add JSDoc to createVerificationCallbackUrl

* fix: address round 3 code review comments (restore comments, fix fvRedirect, restore error handling)

* fix: address PR review feedback from L03TJ3

- Restore try-catch in getWhitelistedRoot with meaningful error message
- Re-throw original error in submitAndWait to preserve error type
- Simplify createVerificationCallbackUrl (remove /verify path enforcement)
- Add parseVerificationResult helper for verified query param parsing
- Restore console.error in App.tsx catch block
- Remove unused navigateToFaceVerification method
- Remove commit-style comment in fvRedirect

* fix: address round 2 PR review feedback from sirpy

- Restore all original JSDoc, try-catch, and error handling patterns
- Add resolveCallbackUrl to IdentitySDK for Farcaster/URL consolidation
- Remove duplicate Farcaster logic from ClaimSDK (delegate to IdentitySDK)
- Remove FarcasterAppConfigs (apps don't have envs in Farcaster)
- Remove redundant isAddressWhitelisted from auth utils
- Move @farcaster/miniapp-sdk to peerDependencies
- Restore VerifyButton original props and chain ID

* feat: add navigateToFaceVerification with Farcaster-aware redirect

- Add navigateToFaceVerification() to IdentitySDK for Farcaster-aware FV navigation
- ClaimSDK.fvRedirect() delegates to IdentitySDK instead of using window.location.href
- Refactor FarcasterAppConfig: domain is now required, appId/appSlug optional
- Support domain-based Farcaster deep links for redirect-back flow
- Pass farcasterConfig through useIdentitySDK and useClaimSDK hooks
- VerifyButton uses navigateToFaceVerification() for correct navigation

* refactor: remove Farcaster config coupling from SDK internals

- Removed `farcasterConfig` from `IdentitySDK` options and class state
- Removed `farcasterConfig` param from `useIdentitySDK` and `useClaimSDK` hooks
- Reverted `generateFVLink` back to using `callbackUrl` directly without internal interception
- Removed `resolveCallbackUrl` helper method
- Reverted `ClaimSDK.fvRedirect()` to use `window.location.href`
- Added explicit `generateFarcasterCallback` method to `IdentitySDK`
- Updated `VerifyButton` to handle Farcaster context explicitly and generate callback URL locally

---------

Co-authored-by: Lewis B <lewis@ikigaistudios.eu>
@pheobeayo

Copy link
Copy Markdown

QA Report
Env: Warpcast mobile app (Android) via Farcaster Mini App preview tool / Wallet: MetaMask (mobile connect hang — pre-existing device issue, unrelated to this PR) → Sign in with Farcaster (WalletConnect/Reown) / Network: Celo mainnet
Branch: finalize-farcaster-support (supersedes #14)
Deployment tested: https://demo-identity-as3dtm1rq-gooddollarteam.vercel.app

Tests

Scenario Expected Actual ✅/❌
Desktop browser — outside Farcaster context Normal (non-miniapp) flow loads and works Confirmed working
Farcaster mini app launch (Warpcast mobile) App loads and becomes visible/interactive Fixed — app renders fully (title, disclaimer, Connect Wallet UI). Confirms the sdk.actions.ready() fix resolves the Blocker filed on #14
Wallet connection via Sign in with Farcaster Wallet connects and persists, unlocking verify/claim flow Connected successfully once, but reverted to "Please connect your wallet to proceed" shortly after, with no clear reproduction trigger ⚠️ Inconclusive
Face verification trigger + redirect (rdu/cbu) Opens FV flow, redirects back with verified=true, UI updates Not reached — blocked by wallet connection not persisting ❌ (blocked)

Bugs: 0 confirmed. 1 flagged as unconfirmed/needs reproduction — see note below.
Verdict: Partial pass — the mini app launch Blocker from #14 is resolved. Redirect handling could not be tested due to a wallet-connection issue that couldn't be isolated to app vs. environment on this pass.
Evidence:
WhatsApp Image 2026-07-23 at 2 46 11 PM
WhatsApp Image 2026-07-23 at 1 46 20 PM
WhatsApp Image 2026-07-23 at 1 34 01 PM (1)
WhatsApp Image 2026-07-23 at 1 34 01 PM

Note for maintainers: Wallet connection reverted to disconnected shortly after a successful Sign in with Farcaster, with no clear trigger identified in this pass (possibly in-app browser session behaviour in Warpcast rather than the app itself — not filing as a confirmed bug). Recommend a follow-up QA pass focused specifically on wallet-connection persistence, since it's currently the blocker preventing redirect-handling verification for this PR.

@L03TJ3 L03TJ3 linked an issue Jul 28, 2026 that may be closed by this pull request
6 tasks
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.

Add Farcaster support for the identity flow

3 participants