pub fn load_or_create_cookie_key(path: &Path) -> Result<Vec<u8>>Expand description
Load the phone cookie signing key, creating it on first use.
Session cookies are stateless, so this file is the only thing that keeps a signed-in phone signed in across daemon restarts. Deleting it is therefore the explicit sign-everyone-out gesture: the next start writes a new key and every outstanding cookie stops validating. A missing file is ordinary first use; an unreadable or too-short one is replaced loudly, because refusing to start would be a worse answer than asking phones to enter the viewer code again.