Pinata
Published in

Pinata

How To Use Sign In With Ethereum And NFTs To Build A Token Gated Instagram

Using Next.js and Pinata

Getting Started

Sign In With Ethereum

npm i siwe next-auth wagmi
NEXTAUTH_SECRET=somereallysecretsecret
JWT_SECRET=itshouldbealsoverysecret
DOMAIN=localhost:3000
-api
-auth
-[...nextauth].js

Checking For NFT Ownership

npm i ethers
import { ethers } from "ethers";

Creating The Gallery

Adding Photos To The Gallery

npm i form-data formidable
import formidable from "formidable";
import fs from "fs";
import FormData from "form-data"

Wrapping Up

--

--

The cloud wasn’t built for this. Pinata was. Managing your NFT media just got easier.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store