Skip to content

feat(life-call): add LM-33a panel authentication#326

Merged
Daisuke134 merged 2 commits into
devfrom
feature/lm33a-panel-auth
Jul 21, 2026
Merged

feat(life-call): add LM-33a panel authentication#326
Daisuke134 merged 2 commits into
devfrom
feature/lm33a-panel-auth

Conversation

@Daisuke134

Copy link
Copy Markdown
Owner

Summary

  • add Telegram /panel generation of a 32-byte opaque token stored only as SHA-256 with uid, chat_id, five-minute expiry, and used_at
  • atomically burn the token through claim_lm_panel_token, exchange it for a separate random 24-hour session, and redirect to token-free /panel
  • require the HttpOnly, Secure, SameSite=Lax session for the placeholder panel showing Anicca Life Manager and uid
  • keep /lm?tg= only for its verified onboarding handoff

Session storage choice: lm_panel_sessions keeps the separately random cookie value hash-only and reuses the existing service-role/PostgREST primitive without adding a signing secret.

Verification

  • cd apps/life-call && npm test — PASS, exit 0
  • node --test lib/panel-auth.test.js — 11 passed, 0 failed
  • negative cases: reused token 403; expired token 403; tampered token 403; missing session 401

Migration and deployment

  • additive SQL is included at apps/life-call/migrations/2026-07-21-lm33a-panel-auth.sql and is intentionally not applied; Fable applies it during E2E
  • staging verification is skipped because Railway is BLOCKED-on-Dais
  • no production deploy and no production webhook change

Primary guidance checked

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: c5e00e4f-b87a-4920-859b-5b3557d9f17b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/lm33a-panel-auth

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Daisuke134
Daisuke134 merged commit c853f21 into dev Jul 21, 2026
2 checks passed
@Daisuke134
Daisuke134 deleted the feature/lm33a-panel-auth branch July 21, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant