pub fn write_token(working_dir: &Path, token: &AuthToken) -> Result<()>Expand description
Write the token to <working_dir>/.dora-token and to the user config
directory (e.g. ~/.config/dora/.dora-token).
On Unix, files are created with mode 0o600 atomically to prevent
a TOCTOU window where the file is briefly world-readable.