oceans404 / generate-frontend-polygon-id-issuer

Build your own Polygon ID Issuer website to easily issue claims to users

Home Page:https://generate-frontend-polygon-id-issuer.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate Your Own Polygon ID Claim Website in 5 minutes

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. site

204710496-3721992a-c3f2-45da-bdb3-fc35c9e99e49

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.

Getting started

Pre-reqs

  • ✅ 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"

Schema ID

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.

Find a Schema ID-high

Run your site locally

npm run dev

(Optional) Add and commit any visual changes you want to make.

Deploy your site with Vercel

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

  1. Click "Add New..." -> Project
  2. Click "Continue with Github"
  3. Import this project (generate-frontend-polygon-id-issuer)
  4. Configure Environment Variables to match your .env file
  5. Click "Deploy" and the result is your very own Issuer website

Screen Shot 2022-11-30 at 3 12 32 PM

About

Build your own Polygon ID Issuer website to easily issue claims to users

https://generate-frontend-polygon-id-issuer.vercel.app/


Languages

Language:JavaScript 84.7%Language:CSS 8.4%Language:HTML 4.8%Language:Shell 2.0%