{"id":20107603,"url":"https://github.com/cryptoalgorithm/webauthn-demo","last_synced_at":"2025-10-10T14:06:43.859Z","repository":{"id":62406333,"uuid":"558264542","full_name":"cryptoAlgorithm/webauthn-demo","owner":"cryptoAlgorithm","description":"A simple but beautiful WebAuthn demo","archived":false,"fork":false,"pushed_at":"2025-03-26T11:29:03.000Z","size":1691,"stargazers_count":9,"open_issues_count":19,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T11:11:22.346Z","etag":null,"topics":["fido2","passkey","webauthn"],"latest_commit_sha":null,"homepage":"https://webauth.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptoAlgorithm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-27T07:52:16.000Z","updated_at":"2024-09-12T17:05:17.000Z","dependencies_parsed_at":"2023-10-04T03:18:27.740Z","dependency_job_id":"90404d97-ac17-4bd3-a2c2-486825e01891","html_url":"https://github.com/cryptoAlgorithm/webauthn-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptoAlgorithm%2Fwebauthn-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptoAlgorithm%2Fwebauthn-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptoAlgorithm%2Fwebauthn-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptoAlgorithm%2Fwebauthn-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptoAlgorithm","download_url":"https://codeload.github.com/cryptoAlgorithm/webauthn-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252657438,"owners_count":21783821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fido2","passkey","webauthn"],"created_at":"2024-11-13T17:58:07.213Z","updated_at":"2025-10-10T14:06:38.808Z","avatar_url":"https://github.com/cryptoAlgorithm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FIDO2 WebAuthn Demo\n\n\u003e An next.js application for demonstrating registration and authentication \n\u003e with a FIDO2 authenticator using the WebAuthn API.\n\nHosted demo (login/signup page) available [here](https://webauth.vercel.app).\n\n## Status\nCurrently, this WebAuthn demo...\n* implements all required steps for WebAuthn registration and \nvalidation as required by the [spec](https://w3c.github.io/webauthn/#sctn-rp-operations)\n  * attestation statement validation is partially complete,\n  with support for `packed` and `none` formats\n  * attestation data signature validation with X.509 certs\n  does not currently validate the whole chain of trust\n  * importing of both RSA and EC COSE-encoded keys are supported\n  * logging during various steps of validation are processed with\n  pino logger, and pretty printed only during development\n* stores the created credential during registration in a Firebase\ndatabase as a [credential record](https://w3c.github.io/webauthn/#credential-record)\n* does all necessary validation to prevent duplicate registrations etc.\n* authenticates user sessions with a JWT token (with a lifetime of 30\nminutes) with the ES512 algorithm\n* displays user info when the user is logged in\n* allows the user to log out or delete their account\n\n## Development\n1. Rename `.env.example` to `.env.local`\n2. Generate an EC 256-bit private key with openssl:\n`openssl ecparam -name prime256v1 -genkey -noout -out private-key.pem`,\nthen derive the public key with `openssl ec -in private-key.pem -pubout -out public-key.pem`\n3. Create a [Firebase project](https://console.firebase.google.com/), then create a service account and download its credentials\n4. Populate the respective values in `.env.local`, replacing `\\n` in\nkeys with `\\\\n`\n5. Install dependencies with `yarn install` (or simply `yarn`) and\nrun `yarn run dev` to start the NextJS dev server\n\n## Deployment\nWant to host your own instance of this demo? Hit the deploy button\nbelow to host this project on Vercel! Remember to configure environment\nvariables (outlined in the steps above) in the Vercel dashboard too.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FcryptoAlgorithm%2Fwebauthn-demo)\n\n###### _This is purely for demonstration purposes and isn't suitable for use in production._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptoalgorithm%2Fwebauthn-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptoalgorithm%2Fwebauthn-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptoalgorithm%2Fwebauthn-demo/lists"}