Skip to content

feat: import auth files from Add Account dialog#12

Open
rexinshimin0001 wants to merge 1 commit into
heyuqiu2023:mainfrom
rexinshimin0001:feat/auth-json-import
Open

feat: import auth files from Add Account dialog#12
rexinshimin0001 wants to merge 1 commit into
heyuqiu2023:mainfrom
rexinshimin0001:feat/auth-json-import

Conversation

@rexinshimin0001

Copy link
Copy Markdown

Summary

  • Add an authenticated POST /api/accounts/import-auth endpoint for importing uploaded/pasted auth JSON files.
  • Add UI controls in the Add Account dialog to upload one or multiple auth.json files, or paste JSON content directly.
  • Reuse scan-dir token parsing logic for email/auth type detection, add duplicate checks, safe filenames, and per-file skipped reasons.
  • Fix existing frontend build blockers: wrap adjacent AccountCard JSX nodes and move the Google Fonts @import before Tailwind directives.

Why

Currently users need server filesystem access to place auth files under accounts/ and then scan the directory. This is inconvenient for remote deployments where users only have web UI access. The new flow lets authenticated users import auth files directly from the browser while preserving the existing directory scan flow.

Validation

  • docker compose up -d --build succeeds.
  • Container starts healthy.
  • /api/health returns OK.
  • New auth import endpoint rejects empty input and reports invalid JSON in skipped.
  • Built frontend contains the new upload/paste import UI strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant