Add anonymous sign-in provider support to user service and types.

- `Provider` 타입에 `anonymous`를 추가하여 비회원 인증 상태를 명시적으로 처리합니다.
- `userService`의 인증 제공자 식별 로직에 `anonymous` 타입을 포함하여 예외 발생을 방지하고 유연한 사용자 관리를 지원합니다.
This commit is contained in:
윤정민 2026-06-25 17:04:12 +09:00
parent 0f8443bc40
commit e466676210
2 changed files with 2 additions and 1 deletions

View File

@ -79,6 +79,7 @@ function providerFromToken(token: DecodedIdToken): Provider {
const raw = token.firebase?.sign_in_provider;
if (raw === "google.com") return "google";
if (raw === "apple.com") return "apple";
if (raw === "anonymous") return "anonymous";
throw new HttpError(
400,
`unsupported sign-in provider: ${raw}`,

View File

@ -1,7 +1,7 @@
import type { Timestamp } from "firebase-admin/firestore";
import type { DateString } from "./dateString";
export type Provider = "google" | "apple";
export type Provider = "google" | "apple" | "anonymous";
export type DailyJudgment = "perfect" | "success" | "fail" | "skip";