{"id":20630753,"url":"https://github.com/teamhanko/passkeys-react-express","last_synced_at":"2025-08-11T06:44:11.895Z","repository":{"id":226183237,"uuid":"767983884","full_name":"teamhanko/passkeys-react-express","owner":"teamhanko","description":"A React + Express example app with passkey authentication, using Hanko Passkey API","archived":false,"fork":false,"pushed_at":"2024-06-06T05:55:54.000Z","size":2364,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T23:47:07.421Z","etag":null,"topics":["nodejs","passkey","reactjs","type","typescript","webauthn"],"latest_commit_sha":null,"homepage":"","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/teamhanko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-03-06T09:00:05.000Z","updated_at":"2025-02-13T05:12:15.000Z","dependencies_parsed_at":"2024-03-06T10:29:25.565Z","dependency_job_id":"8ce910b7-a104-4dc9-a9cc-da28cf95a74e","html_url":"https://github.com/teamhanko/passkeys-react-express","commit_stats":null,"previous_names":["teamhanko/passkeys-react-express"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teamhanko/passkeys-react-express","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamhanko%2Fpasskeys-react-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamhanko%2Fpasskeys-react-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamhanko%2Fpasskeys-react-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamhanko%2Fpasskeys-react-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teamhanko","download_url":"https://codeload.github.com/teamhanko/passkeys-react-express/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamhanko%2Fpasskeys-react-express/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269843217,"owners_count":24484115,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["nodejs","passkey","reactjs","type","typescript","webauthn"],"created_at":"2024-11-16T14:09:27.180Z","updated_at":"2025-08-11T06:44:11.840Z","avatar_url":"https://github.com/teamhanko.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integrating Passkey Authentication in a React and Express App\n\nThis repository demonstrates how to add passkey login functionality to your React and Express app using the Hanko Passkey API. Passkey authentication is a secure and user-friendly alternative to traditional password-based authentication, providing a seamless login experience for users.\n\nFor a detailed tutorial on implementing passkey login in your React and Express app, refer to our blog post: [How to add a passkey login to your React app](https://www.hanko.io/blog/passkeys-react)\n\n![Passkey demo](/passkey.gif)\n\n## Prerequisites\n\nBefore you begin, ensure you have the following:\n\n- Node.js installed (version 20.0.0 or later)\n- Hanko Passkey API key and tenant ID from [Hanko Cloud](https://cloud.hanko.io/)\n\n\u003e **Note:**\n\u003e You'll need to create a Passkey Project on Hanko Cloud with the App URL `http://localhost:5173`. See our docs to learn how to setup a [passkey project](https://docs.hanko.io/passkey-api/setup-passkey-project).\n\n## Getting started\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/teamhanko/passkeys-react-express\n```\n\n2. Set up environment variables\n\nCreate a `.env` file in the `express-backend` directory and add the following environment variables:\n\n```sh\nPASSKEYS_API_KEY=your-hanko-passkey-api-key\nPASSKEYS_TENANT_ID=your-hanko-passkey-tenant-id\n```\n\nReplace `your-hanko-passkey-api-key` and `your-hanko-passkey-tenant-id` with your actual Hanko Passkey API key and tenant ID.\n\n#### Frontend\n\n1. Navigate to the frontend directory:\n\n```bash\ncd react-frontend\n```\n\n2. Install the frontend dependencies using your preferred package manager (e.g., `npm`, `pnpm`, `yarn`, or `bun`). For this project, we've used `pnpm`:\n\n```bash\npnpm install\n```\n\n3. Start the frontend development server:\n\n```bash\npnpm dev\n```\n\n#### Backend\n\n1. Navigate to the backend directory:\n\n```bash\ncd express-backend\n```\n\n2. Install the backend dependencies:\n\n```bash\npnpm install\n```\n\n3. Start the backend server:\n\n```bash\npnpm dev\n```\n\n## Usage\n\n1. Start the application:\n   \n   * Ensure that both the frontend and backend servers are running.\n\n   * Access the application by navigating to `http://localhost:5173` in your web browser.\n  \n2. Log in with a pre-configured user: Navigate to login page, login with one of the pre-configured users.\n\n```json\n    {\n        \"id\": \"b3fbbdbd-6bb5-4558-9055-3b54a9469629\",\n        \"email\": \"john.doe@example.com\",\n        \"password\": \"password123\",\n    },\n    {\n        \"id\": \"22c81b3d-1e7d-4a72-a6b0-ad946e0c0965\",\n        \"email\": \"sergio_mq@example.com\",\n        \"password\": \"very_secure_password\",\n    },\n    {\n        \"id\": \"55c81b3d-1e7d-4a72-a6b0-ad946e0c0965\",\n        \"email\": \"ab@g.com\",\n        \"password\": \"123\",\n    }\n```\n\n3. Register a passkey:\n   \n   * After logging in, register a passkey for the logged-in user.\n\n\n4. Log out:\n   * After the passkey registration is successful, log out of the application.\n\n5. Login with with a passkey\n\n   * On the login page, choose sign in with a passkey option to authenticate using a passkey.\n\n## Support\n\nFeel free to reach out to us on [Discord](https://hanko.io/community) if you get into any issues.\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamhanko%2Fpasskeys-react-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteamhanko%2Fpasskeys-react-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamhanko%2Fpasskeys-react-express/lists"}