Add QR code login#124
Open
clins1994 wants to merge 6 commits into
Open
Conversation
277a789 to
5f6a66c
Compare
This was referenced Apr 29, 2026
2be029e to
b2e11ae
Compare
b2e11ae to
90662be
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
1529b65 to
54a2f91
Compare
# Conflicts: # pkg/connector/e2ee_keys.go
Collaborator
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #94
Summary
This PR adds LINE QR code login as a new login flow while keeping the existing email/password flow intact.
Although the user-facing change is simple (scan QR), implementation touches multiple layers because LINE’s QR login uses a different protocol path with long-poll state transitions and E2EE login key bootstrap.
Why this is larger than it looks
QR login is not a variant of email login. It requires:
SecondaryQrCodeLoginService+ permit-notice long polling)X-Line-Session-ID,X-LST, context-aware long polling)What changed (by area)
1) Connector login flow wiring
QR Code(recommended/default)Email and Password(existing fallback)LineQRLoginprocess implementing display-and-wait behaviorFiles:
pkg/connector/connector.go2) LINE QR protocol client
CreateQRSessionCreateQRCodeCheckQRCodeVerified(Context)VerifyCertificateCreatePinCodeCheckPinCodeVerified(Context)QRCodeLoginV2Files:
pkg/line/methods.gopkg/line/structs.go3) Transport updates for QR long-polling
x-line-applicationX-Line-Session-IDX-LSTFile:
pkg/line/client.go4) E2EE QR bootstrap support
Files:
pkg/line/qr.go(new)pkg/line/secret/secret.gopkg/runner.go5) Docs
File:
README.mdLogin flow behavior
qrCodeLoginV2and stores login metadataFollow-up commits in this PR
33eab2c: QR login token recovery fixes54a2f91: QR login key-handling hardening2f0207c: stale OBS token recovery fix (small isolated bugfix)Reviewer guide
Recommended review order:
pkg/line/methods.go+pkg/line/client.go(protocol + transport)pkg/connector/connector.go(bridge login state machine)pkg/line/qr.go,pkg/line/secret/secret.go,pkg/runner.go)