Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 2.1 KB

auth.md

File metadata and controls

29 lines (24 loc) · 2.1 KB

Authentication

hinge-cli has no official login: Hinge's own sign-in requires a device-bound check this CLI can't produce (the server expects a hardware-backed attestation tied to the real app, not just a phone number and a code). So it reuses the session your own Hinge app already has, captured once from your own phone. Hinge's terms may forbid this; automation can get an account flagged. Use your own account only.

Capture (once, per device)

Run hinge auth capture. It starts the local capture step for you and prints exactly what to do on your phone, in order; it waits up to 5 minutes, then saves the session and cleans up by itself. It needs mitmproxy installed (the command tells you if it isn't).

Manual steps (what auth capture does for you, if you'd rather run it by hand, or need to automate a non-interactive capture):

  1. Install mitmproxy and run HINGE_OUT=hinge-session.json mitmdump -s tools/hinge_token.py.
  2. On the phone: set the Wi-Fi proxy to this computer (port 8080), open http://mitm.it, install the profile and enable full trust under Settings → General → About → Certificate Trust Settings. Turn any VPN off.
  3. Force-quit and reopen Hinge. When hinge-session.json appears, stop mitmproxy.
  4. hinge auth import hinge-session.json (saves the session and deletes the file).
  5. Undo the phone changes: proxy Off, remove the mitmproxy profile.

Storage

  • Default: ~/.config/hinge-cli/session.json (%APPDATA%\hinge-cli\session.json on Windows), mode 0600 where the OS supports it.
  • Password manager: set HINGE_SESSION_REF to an op://, bw://, keychain:// or cmd:// reference holding the same JSON. Nothing is written to disk.
  • hinge auth logout deletes the saved session. Tokens expire; repeat the capture when hinge auth status fails.

Note: user agent

hinge auth import keeps only an allow-list of headers and no longer stores user-agent: every request the CLI sends identifies as a generic Android phone instead (src/api.rs). Sessions imported by an older version still work; their stored user-agent is ignored.