This implementation generates and publishes a did:web on GitHub Pages.
- Node.js 18.17.1
- Fork and Clone this repository
- Setup your config file (
./src/config.json
){ "DOMAIN": <YOUR-GITHUB-PAGES-DOMAIN>, "REPOSITORY": "did-web-on-gh-pages" }
- Generate DID Document
- NOTE: This command generates a private key in
keys/jwk.json.
DO NOT SHARE OR PUBLISH PRIVATE KEY
npm install npm run generate
- NOTE: This command generates a private key in
- Publish your GitHub pages with DID Document
- commit and push the generated DID Document.
git add ./docs/did.json git commit -m "generate did document" git push
- Set up your GitHub page on GitHub to publish the
docs
directory of the main branch in this repository. - Check your Github Pages are deployed.
- commit and push the generated DID Document.
- Resolve generated DID:web in Universal Resolver
- After setting up and publishing your did document, you can run the demo.
- It generates a jwt with the generated private key and verifies it by resolving the did of the issuer of the jwt.
npm run demo