Skip to content

Fix token file save path for VIN-specific tokens - #2

Open
cook1e0 wants to merge 1 commit into
lutzerb:mainfrom
cook1e0:fix-vin-token-path
Open

Fix token file save path for VIN-specific tokens#2
cook1e0 wants to merge 1 commit into
lutzerb:mainfrom
cook1e0:fix-vin-token-path

Conversation

@cook1e0

@cook1e0 cook1e0 commented Apr 18, 2026

Copy link
Copy Markdown

Fixes #1

This patch ensures that tokens for VIN‑specific vehicles are saved in the directory specified by FORDLOGGER_TOKEN_DIR instead of the working directory.

Previously, auth.py wrote files like tokens_.json to whatever directory the program was run from, while later runs looked for VIN token files in the configured token directory. In Docker deployments this mismatch meant that a successful auth flow could still fail later because the token file wasn’t persisted or found.

The patch introduces an os import and writes the VIN token file into the directory pointed to by FORDLOGGER_TOKEN_DIR, creating it if necessary.

The fallback behaviour that writes to tokens.json remains unchanged. After applying this change, the token file is persisted in the correct location and discovered properly on subsequent runs.

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.

Token Issue

1 participant