docs(proposal): Invisible Firefox auth_token extractor helper#427
docs(proposal): Invisible Firefox auth_token extractor helper#427feder-cr wants to merge 1 commit into
Conversation
Adds a draft proposal for an optional browser-based auth_token extractor helper that lets users log in once via a stealth browser, then twikit's existing load_cookies consumes the resulting cookies.json. No change to HTTP core. Opened as draft to check interest before building.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Reviewer's GuideAdds a new proposal document describing an optional Invisible Firefox-based helper module for performing X login in a real browser and exporting cookies for use with existing twikit cookie loading APIs, without modifying the core HTTP logic. Sequence diagram for Invisible Firefox auth_token extraction helper usagesequenceDiagram
actor User
participant Helper as invisible_firefox.login_to_cookies
participant Playwright as invisible_playwright
participant Firefox as InvisibleFirefoxBrowser
participant X as X
participant Client as Client
User ->> Helper: login_to_cookies(username, email, password, output)
Helper ->> Playwright: launch_stealth_browser()
Playwright ->> Firefox: start_patched_firefox()
Firefox ->> X: navigate_to_login()
Firefox ->> X: submit_credentials()
X -->> Firefox: auth_token_and_cookies
Firefox -->> Helper: browser_cookies
Helper ->> Helper: write_cookies_file(output)
User ->> Client: Client(language)
User ->> Client: load_cookies(output)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@d60 any interest in the optional browser-based auth_token extractor? opt-in, doesn't touch the default flow. glad to close if not useful. |
opening as draft to check interest before building the helper module.
would an optional browser-based auth_token extractor helper be in scope? a small module that performs the X login flow in a real stealth browser once, then writes cookies to a file that twikit's existing
load_cookiesreads directly. no change to twikit's HTTP core.motivation:
ToProtectYourAccount.mdalready recommendssave_cookies/load_cookiesto avoid repeatedlogincalls. the first login still needs to happen somewhere, and X's login flow now requires JS challenges (Castle Token, ondemand.s.js fingerprinting) that pure HTTP can't pass cleanly. relevant open PRs: #324, #393, #410.the helper would wrap feder-cr/invisible_playwright, which drives a patched Firefox 150 (feder-cr/invisible_firefox, MPL-2, same license as Firefox upstream, fingerprint patches at the C++ source level). optional dependency, only loaded when the helper is imported.
this PR only adds a proposal doc at the repo root so the idea has somewhere concrete to land. tracking discussion: #426
if not in scope i'll close without noise.
Summary by Sourcery
Documentation: