Rahat Chowdhury

SSO with Ethereum and Next JS

What if logging in was as simple as connecting a wallet, with no passwords or gas fees? Learn how to build this SSO flow with Next.js.

SSO with Ethereum and Next JS
#1about 3 minutes

Exploring the user experience flaws in web authentication

Traditional authentication methods like email with passwords and social logins create user friction and dependency on centralized services.

#2about 4 minutes

Understanding Web3 wallets and cryptographic signatures

Web3 wallets are key pairs, not containers for money, that enable users to sign data cryptographically without paying gas fees.

#3about 3 minutes

Mapping the wallet-based authentication user flow

A user connects their wallet, the backend generates a unique number (nonce), and the user signs it to prove ownership.

#4about 4 minutes

Building the frontend with Next.js and Ethers.js

The frontend uses Ethers.js to interact with the wallet's global object, request the user's account, and get a signer instance.

#5about 4 minutes

Implementing the backend API routes in Next.js

Serverless API routes handle user creation, generate a unique nonce, and later verify the signature by decoding it.

#6about 5 minutes

A live demonstration of the wallet sign-in process

See the complete authentication flow in action, from clicking the connect button to the MetaMask signature request and successful login.

#7about 2 minutes

Q&A on wallet providers and developer tooling

Wallet data is managed by providers like MetaMask, and Ethers.js was chosen over Web3.js for its developer-friendly documentation.

#8about 6 minutes

Q&A on mobile access and account recovery strategies

WalletConnect enables mobile wallet access, and account recovery currently relies on seed phrases, with social recovery being explored.

#9about 13 minutes

Q&A on managed services, multi-chain, and privacy

While no direct Auth0 equivalent exists yet for Web3, services are emerging, and this system only stores the user's public wallet address.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles
DC
Daniel Cranney
Dev Digest 195: End of Likes, JavaScript’s a Zoo, and Messing with Bots!
Inside last week’s Dev Digest 195 . 👎 No more external likes 🤗 Needy programs 📉 The worst selling Microsoft product 🟨 JavaScript engines zoo 🍞 No more toasts! 🤖 Messing with bots 👔 Beware of fake job interviews 🗞️ Join over 150,000 developers alread...
Dev Digest 195: End of Likes, JavaScript’s a Zoo, and Messing with Bots!
DC
Daniel Cranney
Next.js App Router: Explained
IntroductionVercel’s Next.js has come a long way since its initial release in 2016. What would become the most popular React framework (according to their own website, at least), started as a simple solution for handling routing, SEO optimisation and...
Next.js App Router: Explained
DC
Daniel Cranney
Security Basics for Vibe Coders
Vibe coding has become a popular trend in the tech world. With so many tools now available for both developers and non-developers, it’s easier than ever to build projects using natural language, in some cases without touching a line of code along the...
Security Basics for Vibe Coders
CH
Chris Heilmann
Dev Digest 138 - Are you secure about this?
Hello there! This is the 2nd "out of the can" edition of 3 as I am on vacation in Greece eating lovely things on the beach. So, fewer news, but lots of great resources. Many around the topic of security. Enjoy! News and ArticlesGoogle Pixel phones t...
Dev Digest 138 - Are you secure about this?

From learning to earning

Jobs that call for the skills explored in this talk.