Wrap the post-write chmodSync in try/catch like auth.ts: the key is already written with mode 0600, so a rare chmod failure shouldn't misreport a successful write as a 500.
Wrap the post-write chmodSync in try/catch like auth.ts: the key is already written with mode 0600, so a rare chmod failure shouldn't misreport a successful write as a 500.