From 874749df46cc291ca61f2f98092ccabfdeffbf16 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sat, 26 Sep 2026 00:19:53 +0900 Subject: Add passkey login and favorite search terms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Single-user auth: any registered passkey logs in as the owner. First registration needs a one-time token that the app writes to data/registration-token when no passkey exists yet; once logged in, more passkeys can be added without a token. Logged in, /favorites manages a list of terms (e.g. band names). Events whose title or artist contains a term (NFKC + case-insensitive) get a ★, and the event list gains an "お気に入りのみ" filter. Co-Authored-By: Claude Opus 5.5 --- Deploy.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Deploy.md') diff --git a/Deploy.md b/Deploy.md index 11921f3..91ae34e 100644 --- a/Deploy.md +++ b/Deploy.md @@ -66,6 +66,22 @@ git remote add hetzner golive:/var/git/tokyo-livehouse-events.git git push hetzner master ``` +## パスキー(ログイン) + +利用者は1人。どのパスキーでログインしても同じオーナー扱い。ログインするとお気に入りワード(`/favorites`)が使える。 + +```bash +# 初回登録: パスキー未登録なら /login へのアクセス時にトークンが自動生成される +curl -s https://golive.yyamashita.com/login > /dev/null +ssh root@localhost 'cat /app/tokyo-livehouse-events/data/registration-token' +# → https://golive.yyamashita.com/login?token=<トークン> を開いて登録(トークンは1回で消える) + +# 全デバイスを失った場合: トークンを手で作って再登録 +ssh root@localhost 'openssl rand -base64 24 | tr "+/" "-_" > /app/tokyo-livehouse-events/data/registration-token' +``` + +2台目以降は、ログイン済みの状態で `/favorites` →「パスキーを追加」。 + ## ローカル開発 ```bash -- cgit v1.3