Self-service claim issuer template by Steph oceans404
Tired of manually creating and sending Polygon ID claim links one by one? Here's a claim site I created for my Polygon ID AboutMe schema so that users can self-service claim. It's totally reusable code. All you have to do is modify the email, password, and schema id in the .env file, then deploy your personalized site to Vercel.
Caveat: Because your users are essentially issuing your claims to themselves, they are not truely VERIFIED credentials. For example, I don't actually have 4 pets, but I was able to claim that I have 4 because no one verified this. Use this repo to spin up Issuer playgrounds for your Polygon ID apps, but understand that a real-world verifier probably would not trust a self-service issuer that works without some type of checking logic before allowing a user to claim.
- ✅ Install Node and npm
- ✅ Sign up for a Polygon ID account and create an Issuer (takes about 2 minutes total)
- ✅ Read the Triangle of Trust to understand the relationship between an Issuer, Holder, and Verifier. This repo generates an issuer (website) so a holder (user) can claim identity-based information.
✰ Star and fork this repo, then git clone your fork of the repo
https://github.com/{YourGithubUsername}/generate-frontend-polygon-id-issuer.git
cd generate-frontend-polygon-id-issuer
npm i
cp .env.example .env;
Open the newly created .env
file and replace the values with your Polygon ID email, password, and schema ID.
VITE_POLYGON_ID_EMAIL="yourEmail+test0@gmail.com"
VITE_POLYGON_ID_PASSWORD="Your!0Very!1Secure2.Password!"
VITE_POLYGON_ID_SCHEMA_ID="77e48fa2-37e6-4818-b767-71588f6c0b73"
If you haven't created a schema yet, check out "Create a schema" in my node-polygon-id-platform-apis repo. This should only take a minute and you need a schema so you have a schemaID for your frontend to use to fetch the schema and display correct form fields for each attribute.
If you already created a Schema, you can find out a schema's id on the "Created Schemas" page of Polygon ID Platform by clicking the schema and grabbing the id from the schemaID parameter in the url.
npm run dev
(Optional) Add and commit any visual changes you want to make.
Vercel makes it super quick and easy to deploy an app. Seriously. They didn't even pay me to say that. Go to the Vercel dashboard
- Click "Add New..." -> Project
- Click "Continue with Github"
- Import this project (generate-frontend-polygon-id-issuer)
- Configure Environment Variables to match your .env file
- Click "Deploy" and the result is your very own Issuer website