bannzai / bannzai/nikki

パスキーでの登録・認証を実装する (現状はスタブUIを撤去済み)

Open
#84 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
0
Forks
0
Avg merge
10h 28m
Merged PRs (30d)
30

Description

## 背景

パスキーは現状、完全な UI スタブで実体がない (ASAuthorization / WebAuthn 系の実装はリポジトリに存在しない)。

- 設定 > 鍵 の「パスキー」行: `passkeyRegistered` (常に false) を「未登録」と表示するだけで、タップしても何も起きなかった
- オンボーディング最終ステップの「パスキーを登録する」ボタン: `onboardingCompleted = true` を立てるだけで登録処理はなかった

誤解を招くため、PR (remove-template ブランチ) でこれらのスタブ UI を撤去した。実装するときに UI を戻す。

## やること

- パスキー (WebAuthn / ASAuthorizationPlatformPublicKeyCredential 系) での登録・認証を実装する
- 何の鍵として使うかの設計から必要 (現状のロック解除は LocalAuthentication の `.deviceOwnerAuthentication`。パスキーを日記の暗号鍵・ロック解除のどちらに紐づけるか、relying party をどこに置くか)
- 実装時に戻す UI:
- 設定 > 鍵 の「パスキー」行 (SettingsPage。撤去時のコメントに位置を記載)
- オンボーディング最終ステップの「パスキーを登録する」ボタン (OnboardingBiometricPage)
- UserDefaults の `passkeyRegistered` キー (BoolKey。撤去済み)

## メモ

- スタブ撤去時点の表示確認: 設定の鍵セクションは「Face ID で解除」トグルのみ、オンボーディング最終ステップはボタン1つのみ
- String Catalog の "Passkey" / "Register a passkey" キーは残っている (実装時に再利用できる)

## セッション再開

```sh
cd /Users/bannzai/worktrees/bannzai/nikki/remove-template
claude --resume d13905ee-c0ad-47a4-90f8-5a7d1dbff0d1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the existing LocalAuthentication lock flow and the removal comments for SettingsPage, OnboardingBiometricPage, and BoolKey. Define how a passkey maps to diary encryption or lock release and where the relying party lives before implementing the ASAuthorization/WebAuthn registration and authentication flow. Done means the restored UI performs real registration and authentication, with the retained String Catalog keys reused.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
authentication, mobile, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.