Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/worker-tools/webauthn-example
Example project for password-less login through WebAuthn in Cloudflare Workers and Deno.
https://github.com/worker-tools/webauthn-example
cloudflare-workers deno webauthn webauthn-demo workers
Last synced: 2 months ago
JSON representation
Example project for password-less login through WebAuthn in Cloudflare Workers and Deno.
- Host: GitHub
- URL: https://github.com/worker-tools/webauthn-example
- Owner: worker-tools
- Created: 2022-06-04T10:32:24.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-10-08T16:39:42.000Z (over 2 years ago)
- Last Synced: 2024-05-09T17:04:06.795Z (9 months ago)
- Topics: cloudflare-workers, deno, webauthn, webauthn-demo, workers
- Language: TypeScript
- Homepage: https://webauthn.qwtel.workers.dev
- Size: 87.9 KB
- Stars: 42
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Workers WebAuthn Example
Example project for passwordless login through WebAuthn in [Worker Runtimes](https://workers.js.org) built with [Worker Tools](https://workers.tools)
## Usage
### Deno
Requires Deno 1.22 or higher.```sh
deno task serve
```This will store sessions and users in a SQLite file at the root.
### Cloudflare Workers
If you have [Miniflare](https://miniflare.dev) installed, just run```sh
miniflare
```If you have wrangler 2 or later installed, run
```sh
wrangler dev --local
```For running on CF Workers proper,
get your CF `account_id` from the workers dashboard and overwrite in `wrangler.toml`.
Create a new KV namespace on the workers dashboard and overwrite `id` and `preview_id`:```toml
account_id = '...'
kv_namespaces = [
{ binding = "KV_STORAGE", id = "...", preview_id = "..." }
]
```Then run
```sh
wrangler dev
```If you want to run on a other port than 8787, update `WORKER_LOCATION` in `wrangler.toml`, otherwise WebAuthn calls will fail.