Skip to content

Implemented Connect with Metamask for signup#159

Open
dev-Aarish wants to merge 3 commits into
daviddprtma:mainfrom
dev-Aarish:feat/76-metamask
Open

Implemented Connect with Metamask for signup#159
dev-Aarish wants to merge 3 commits into
daviddprtma:mainfrom
dev-Aarish:feat/76-metamask

Conversation

@dev-Aarish

Copy link
Copy Markdown

Pull Request — AgroDex

📌 Related Issue

Fixes #76


Description of Changes

Added MetaMask sign-in via Supabase Web3 Auth (EIP-4361).

When the user clicks Connect MetaMask, the app detects the MetaMask extension, requests account access, ensures the wallet is on Hedera Testnet (auto-switching or adding the network if needed), and then calls Supabase's built-in signInWithWeb3 to generate and sign an Ethereum authentication challenge, creating a session without needing an email or password.


Type of Change

  • 🐛 Bug Fix
  • ✨ New Feature
  • 🎨 UI/UX or Design Update
  • Other

📸 Screenshots / Video

Screenshot 2026-06-22 at 7 43 37 PM Screenshot 2026-06-22 at 7 43 09 PM

✅ Checklist

  • I’ve read the CONTRIBUTING.md guidelines.
  • My code follows the project’s conventions.
  • I’ve linked the related issue correctly.
  • I’ve tested my changes locally.
  • I’ve added or updated documentation/comments if needed.
  • My PR title follows the branch & commit naming conventions.
  • My changes introduce no new warnings or errors.
  • I’ve performed a self-review of my work.

💬 Additional Notes (Optional)

Currently the signing process by supabase is done on the production url https://agro-dex-1u85.vercel.app/ and might fail when the supabase.auth.signInWithWeb3 has the localhost url. It would work on the localhost url when that is added to one of the site url in the supabase project.

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@dev-Aarish is attempting to deploy a commit to the daviddprtma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@daviddprtma daviddprtma moved this from Todo to In Progress in AgroDex SSoC'26 Project Jun 23, 2026
Comment thread src/lib/metaMaskAuth.ts
* Check if MetaMask or any EIP-1193 provider is installed
*/
export function isMetaMaskInstalled(): boolean {
return typeof window !== "undefined" && typeof (window as Record<string, any>).ethereum !== "undefined";

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

can you comment in the above with this // eslint-disable-next-line @typescript-eslint/no-explicit-any ?? because in the frontend CI, it's failed to passed it.

Added ESLint directive to ignore explicit any type check.

Signed-off-by: Aritro Bag <aritrobag362@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Feature : SignUp or Login with Metamask

2 participants