Repository navigation
Conversation
Remove hardcoded NEXTAUTH_SECRET/AUTH_SECRET from .env.tauri and generate a unique per-install secret at first sidecar startup. - resolve_or_create_auth_secret(): reads auth.secret from Tauri app data dir; treats empty file as missing and regenerates (no empty-secret bug) - create_secret_file(): uses create_new(true) + mode(0o600) at creation on Unix so permissions are set before any data is written; no write-then-chmod race - write_secret_atomic(): removes any leftover .tmp file before calling create_new(true), then atomically renames temp -> final path - Secret is 32 random bytes, Base64-encoded (44 chars via getrandom + base64 crates) - AUTH_SECRET and NEXTAUTH_SECRET injected into sidecar process env - docs/desktop-app.md: add Auth Secret section documenting per-platform storage paths, format, reuse across restarts, deletion impact, dev mode Fixes #55 Co-authored-by: hacksynth <hacksynth@users.noreply.github.com>
This was referenced May 2, 2026
Owner
Author
|
Closing because Claude failed twice to push the remaining rustfmt-only fix, leaving this PR with a failing Tauri Check / rust status. The issue remains blocked on a manual cargo fmt --manifest-path src-tauri/Cargo.toml formatting update or a Claude environment that can apply/push the rustfmt line wraps. No code was changed manually per instruction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #55
Summary
.env.tauri.AUTH_SECRET/NEXTAUTH_SECRETinto the Tauri sidecar environment.auth.secretatomically with owner-only creation semantics on Unix and document storage/loss behavior.Review notes
claude/issue-55-20260502-1648after rejecting1638because it regressed empty-secret and temp-file creation behavior.cargo fmt.