Stage 11: account linking & merge (email + Telegram Login Widget) (#12)
This commit was merged in pull request #12.
This commit is contained in:
+29
-5
@@ -272,18 +272,42 @@ table UpdateProfileRequest {
|
||||
notifications_in_app_only:bool = true;
|
||||
}
|
||||
|
||||
// EmailBindRequest asks the backend to send a confirm-code binding email to the
|
||||
// caller's account.
|
||||
table EmailBindRequest {
|
||||
// --- account linking & merge (Stage 11, authenticated) ---
|
||||
|
||||
// LinkEmailRequest mails a confirm-code to email for a later link or merge. The
|
||||
// code is always sent (no pre-send "taken" signal), so a probe cannot enumerate
|
||||
// registered addresses.
|
||||
table LinkEmailRequest {
|
||||
email:string;
|
||||
}
|
||||
|
||||
// EmailConfirmRequest verifies the code and binds the email (returns Profile).
|
||||
table EmailConfirmRequest {
|
||||
// LinkEmailConfirm carries the email and its confirm code, for both the confirm
|
||||
// (preview) and the explicit merge step.
|
||||
table LinkEmailConfirm {
|
||||
email:string;
|
||||
code:string;
|
||||
}
|
||||
|
||||
// LinkTelegramRequest carries Telegram Login Widget data (a URL query string) for
|
||||
// attaching a Telegram identity to the current account.
|
||||
table LinkTelegramRequest {
|
||||
data:string;
|
||||
}
|
||||
|
||||
// LinkResult is the unified result of a confirm or merge step. status is "linked"
|
||||
// (bound to the caller), "merge_required" (the identity belongs to another account —
|
||||
// the secondary_* fields summarise it for the irreversible confirmation), or
|
||||
// "merged" (done). session is present only when the active account switched (a guest
|
||||
// initiator whose durable counterpart won) — the client adopts it.
|
||||
table LinkResult {
|
||||
status:string;
|
||||
secondary_user_id:string;
|
||||
secondary_display_name:string;
|
||||
secondary_games:int;
|
||||
secondary_friends:int;
|
||||
session:Session;
|
||||
}
|
||||
|
||||
// StatsView is a durable account's lifetime statistics (games-played and win-rate
|
||||
// are derived client-side).
|
||||
table StatsView {
|
||||
|
||||
Reference in New Issue
Block a user