Skip to content

feat: support login for Letter Sealing OFF (LSOFF) accounts - #69

Closed
clins1994 wants to merge 4 commits into
beeper:mainfrom
clins1994:pr/lsoff-login
Closed

clins1994 wants to merge 4 commits into
beeper:mainfrom
clins1994:pr/lsoff-login

Conversation

@clins1994

Copy link
Copy Markdown
Contributor

Summary

Enables LSOFF accounts to log into the bridge. The login flow detects code 89 "not supported" and falls back to a non-E2EE login path.

How it works

  1. loginV2 with type 2 + E2EE secret fails with code 89
  2. Bridge fetches a fresh RSA key (LINE invalidates the previous one)
  3. Retries loginV2 with type 0, no secret, new RSA key → returns verifier + PIN
  4. Polls JQ endpoint (not LF1) until user confirms on phone
  5. loginV2WithVerifier finalizes login (no E2EE key chain)

Changes

  • Login() — LSOFF retry with fresh RSA key
  • WaitForLogin() — routes to waitForLoginJQ (LSOFF) or waitForLoginLF1 (LSON)
  • NoE2EE flag plumbed through LoginResult → LineEmailLogin → WaitForLogin
  • LF1 fallback — tries LoginV2WithVerifier directly if no E2EE data and no direct token

PR 3 of 4

Based on PR #68 (plain text messaging). Part of the series split from #65:

  1. E2EE media fixes (fix: E2EE media — keyMaterial in payload, PNG transparency, encryptThumbnail refactor #67)
  2. Plain text messaging + media (feat: plain text messaging and media support for non-E2EE chats #68)
  3. LSOFF login (this PR)
  4. UX + docs — standalone

🤖 Generated with Claude Code

clins1994 and others added 2 commits March 29, 2026 17:13
…ryptThumbnail refactor

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add automatic detection of Letter Sealing (E2EE) availability per peer
and per group. When E2EE is unavailable (peer has LS off, group has no
shared key, or E2EE manager not initialized), messages are sent as plain
text with media uploaded via the r/talk/m/{msgId} endpoint after sending.

Key changes:
- Send: detect plainText mode via peer key probe (1:1) or group E2EE
  cache; branch each media type into plain vs E2EE upload paths; gate
  encryption phase; post-send upload for plain media via UploadOBSPlain
- Receive: detect plain media (OID empty), download from SID "m" with
  token refresh retry; add 202 retry loop in DownloadOBSWithSID for
  video transcoding delays
- Add pkg/line/errors.go with IsNoUsableE2EEPublicKey/GroupKey helpers
- Add peer key noE2EE caching with TTL, group noE2EE cache with
  invalidation on receiving encrypted messages
- Reject media captions and add video/quicktime MIME support
- Use obsTypeFromSID helper for correct OBS type parameter

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
clins1994 and others added 2 commits March 29, 2026 18:01
Removes talkExceptionData, isNoUsableE2EEGroupKeyTalkException,
parseTalkExceptionData, and parseE2EEGroupKeyError — none are called.
Fixes staticcheck U1000 lint errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@clins1994 clins1994 closed this Mar 29, 2026
@clins1994
clins1994 deleted the pr/lsoff-login branch March 29, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant