Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.76 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.76 KB

Node Provider Protection with JWTs in Frontend dApps

Medium Medium

Locks

This project demonstrates how to protect node provider API keys (e.g., for services like Alchemy) in frontend dApps using JWTs. By leveraging short-lived JWTs, we can securely manage access to node providers without exposing API keys directly in the frontend. For a detailed explanation, check out the blog post here, and see the solution in action in the demo app.

Getting Started

Follow these steps to set up the project locally:

Environment Variables

Create a .env file in the root of the project and add the following environment variables. You can find the explanations for these variables in the blog post.

ALCHEMY_PRIVATE_KEY_PKCS8=<Your PKCS8 Private Key>
ALCHEMY_KEY_ID=<Your Key ID>
NEXT_PUBLIC_WC_PROJECT_ID=<Your WalletConnect Project ID>

Development Server

To run the application locally, run:

npm install
npm run dev