Skip to content

0.4.0: Reliable authentication + setup-code pairing

Choose a tag to compare

@gabrielrubens gabrielrubens released this 02 Jul 18:43

0.4.0 — Reliable authentication + setup-code pairing

The connection to Pensio now survives long gaps, force-quits, and server deploys — and pairing takes one short code instead of two pasted tokens.

Connect with a setup code

  • In Pensio, open Settings → API tokens → Connect Obsidian to generate a one-time 8-character code, then enter it in the plugin settings and click Connect.
  • Every pairing gets its own per-device credentials, so connecting a second device can never break the first.
  • Manual access/refresh token entry moved under Advanced (for self-hosted servers).

Authentication that doesn't die

  • No more "Session expired" after leaving Obsidian closed for a few days — token renewal is now forgiving by design (the server keeps the previous refresh token valid until it naturally expires).
  • Temporary problems (offline, server errors, deploys) retry with backoff and never log you out; the plugin never deletes tokens on failure — wiping is for explicit logout only.
  • If a session is genuinely revoked, the status bar shows Reconnect Pensio and settings ask for a new setup code. Your notes and sync history are untouched.
  • Token writes to Obsidian's encrypted SecretStorage are verified by read-back, with a final flush on plugin unload.
  • Each install now generates a stable device ID (fixes refresh failures on fresh installs).

Polish

  • Status bar uses proper icons instead of emoji.
  • Removed the "Pensio plugin loaded" startup notice.
  • 22 new authentication tests (suite: 120 tests).

Full docs: see TOKEN_REFRESH.md in the repo for the complete auth architecture.