Skip to content

Fix config storage for self-hosted instances#5

Open
bvorh wants to merge 1 commit into
solidtime-io:mainfrom
bvorh:fix-endpoint-storage
Open

Fix config storage for self-hosted instances#5
bvorh wants to merge 1 commit into
solidtime-io:mainfrom
bvorh:fix-endpoint-storage

Conversation

@bvorh

@bvorh bvorh commented Jul 13, 2026

Copy link
Copy Markdown

I'm running a self-hosted instance of solidtime, and was running into the following issue with the browser extension:

  • Install extension
  • Configure instance settings (URL and client ID)
  • Log in
  • Open a Linear issue, click the "Start Tracking" button
  • A message pops up saying I need to log in
  • When opening the extension popup, all settings reset to default (I need to log in again)

I used an LLM to identify the issue and propose a fix. However, I do understand the changes it proposed, tested them and cleaned up the code before opening an MR.

Issue Description

The problem was that the auth and refresh tokens are stored in the global browser storage, but the instance configuration (endpoint and clientId) were not. The instance config was stored in local/vue storage instead, which is not shared between the background and the content context. Thus, when the first API call from the Linear page was made, the endpoint config fell back to default settings, causing the API call to fail. I could also observe this in the Chrome console (401 error from app.solidtime.io instead of my own configured domain).

Fix

The fix involves storing the instance config in the global browser storage, ensuring local changes are reflected (using watch) and introducing a new exported ready Promise which other components can await before using any of the values stored in the common storage.

Testing

I tested the changes both with npm run dev and by installing the unpacked extension in my Chromium browser. I can now successfully log in to my self-hosted instance, and the API calls go through.

Looking forward to your feedback on this, I'm happy to incorporate any changes you would like me to add.

Move endpoint URL and client ID from local storage to browser storage,
so it persists across different contexts.
@bvorh bvorh changed the title Fix config storagte for self-hosted instances Fix config storage for self-hosted instances Jul 13, 2026
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