To log in with Passkey, you need to create an account once you login with your Github account. After logging in, you will be able to log in by adding Passkey.
- TypeScript
- Remix
- cloudflare pages
- cloudflare KV workers
- cloudflare D1
- drizzle-orm
- simplewebauthn
Go to Cloudflare and create an account.
Go to Cloudflare Pages and create a application.
# setup wrangler command
npx wrangler login
Create a KV namespace for session storage.
npx wrangler kv:namespace create session
npx wrangler kv:namespace create session --preview
And add the following to wrangler.toml
.
name = "<your application name>"
...
[[kv_namespaces]]
binding = "KV"
id = "<your kv namespace id>"
preview_id = "<your kv namespace preview_id>"
Create a D1 database.
npx wrangler d1 create <your database name>
And add the following to wrangler.toml
.
...
[[d1_databases]]
binding = "DB"
database_name = "<your database name>"
database_id = "<your database id>"
rm -rf migrations/*
npm run migrate:create
npm run migrate:apply # apply to local sqlite database
npm run dev
open http://localhost:8788/
Deploy to Cloudflare Pages.
npm run migrate:apply-prod
npm run deploy-prod