{"id":21590255,"url":"https://github.com/corbado/keycloak-passkeys","last_synced_at":"2025-06-16T02:09:07.255Z","repository":{"id":208858685,"uuid":"663088293","full_name":"corbado/keycloak-passkeys","owner":"corbado","description":"Keycloak Passkey repository of a sample Node.js app with existing users.","archived":false,"fork":false,"pushed_at":"2024-05-08T13:53:25.000Z","size":89,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T22:08:50.633Z","etag":null,"topics":["authentication","faceid","fido2","keycloak","passkey","passkeys","passwordless","touchid","webauthn"],"latest_commit_sha":null,"homepage":"https://www.corbado.com/passkeys/keycloak","language":"JavaScript","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/corbado.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":"2023-07-06T14:23:03.000Z","updated_at":"2025-01-10T10:47:20.000Z","dependencies_parsed_at":"2023-11-23T17:25:51.162Z","dependency_job_id":"ccacac1d-e886-4781-9bde-e1734425f8dc","html_url":"https://github.com/corbado/keycloak-passkeys","commit_stats":null,"previous_names":["corbado/keycloak-passkeys"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/corbado/keycloak-passkeys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corbado%2Fkeycloak-passkeys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corbado%2Fkeycloak-passkeys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corbado%2Fkeycloak-passkeys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corbado%2Fkeycloak-passkeys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corbado","download_url":"https://codeload.github.com/corbado/keycloak-passkeys/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corbado%2Fkeycloak-passkeys/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260083862,"owners_count":22956409,"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":["authentication","faceid","fido2","keycloak","passkey","passkeys","passwordless","touchid","webauthn"],"created_at":"2024-11-24T16:17:22.852Z","updated_at":"2025-06-16T02:09:07.228Z","avatar_url":"https://github.com/corbado.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keycloak Passkey Node.js Integration Example\n\nThis is a sample implementation of a Keycloak based app with existing users where the Corbado's passkey-first web component is integrated. Keycloak can be kept as existing auth solution, while Corbado handles the passkey authentication part. Existing password-based users from Keycloak are integrated using Corbado webhooks while new users are stored passwordless.\n\nRead the **full tutorial** in our [blog post here](https://www.corbado.com/blog/keycloak-passkeys).\n\n**Note:** In this tutorial, an existing app is created with some pre-existing, password-based users. Have a look at our [docs](https://docs.corbado.com/integrations/web-component/no-existing-user-base) to see the integration if you don't have any users yet.\n\n## 1. File structure\n\n```\n├── app.js\n├── .env\n├── src\n|   ├── controllers\n|   |   ├── authController.js           # renders views and uses Corbado SDK for session management\n|   |   └── corbadoWebhookController.js # Takes all requests belonging to the Corbado webhook logic\n|   |\n|   ├── routes\n|   |   ├── authRoutes.js               # All routes belonging to certain views\n|   |   └── corbadoWebhookRoutes.js     # All routes belonging to the Corbado webhook\n|   |\n|   ├── services\n|   |   └── userService.js              # Communicates with Keycloak\n|   |\n|   └── views/pages\n|       ├── login.ejs                   # Login page with the web component\n|       └── profile.ejs                 # Profile page showing user info\n```\n\n## 2. Setup\n\n### 2.1. Configure environment variables\n\nPlease follow steps 1-3 on our [Getting started](https://docs.corbado.com/overview/getting-started) page to create and configure a project in the [Corbado developer panel](https://app.corbado.com).\n\nNext, follow steps 4-6 on our [Web component guide](https://docs.corbado.com/integrations/web-component#4.-define-application-url) and set the Application URL to `http://localhost:3000/login`, the Redirect URL to `http://localhost:3000/profile` and the Relying Party ID to `localhost`.\n\nIn the [integration mode settings](https://app.corbado.com/app/settings/integration-mode), make sure you have selected `Web component` as integration mode and selected `Yes` as existing user base.\n\nLastly, configure the [webhooks](https://app.corbado.com/app/settings/webhooks) as seen in the image:\n\u003cimg width=\"1283\" alt=\"webhooks\" src=\"https://github.com/corbado/example-webcomponent-keycloak/assets/23581140/bba5c3de-0d51-4687-a56f-0250069ddf67\"\u003e\n\nUse the values you obtained above to configure the following variables inside `.env`:\nThe CLI secret is located [here](https://app.corbado.com/app/settings/credentials/cli-secret).\n\n1. **PROJECT_ID**=\"\"\n2. **API_SECRET**=\"\"\n3. **CLI_SECRET**=\"\"\n\n### 2.2. Start Docker containers\n\n**Note:** Before continuing, please ensure you have [Docker](https://www.docker.com/products/docker-desktop/) installed and accessible from your shell.\n\nUse the following command to start the system:\n\n```\ndocker compose up\n```\n\n**Note:** Please wait until all containers are ready. This can take some time.\n\n## 3. Usage\n\nAfter step 2.2. your local server should be fully working.\n\nIf you now visit [http://localhost:3000](http://localhost:3000), you should be forwarded to the `/login` page.\n\nWhen authenticated you will be forwarded to the `/profile` page.\n\nYou can find the Keycloak Dashboard at [http://localhost:8080/admin/master/console/](http://localhost:8080/admin/master/console/) with username and password both being `admin`. Feel free to navigate to the Users-page and adding some password-based users. If you go back to [http://localhost:3000](http://localhost:3000), you'll be able to login with those users as well as explore the possibilities of passkeys with optimized UI experience.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorbado%2Fkeycloak-passkeys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorbado%2Fkeycloak-passkeys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorbado%2Fkeycloak-passkeys/lists"}