Enable Banking: warn before the bank's permission runs out, and link again cleanly

- save when the permission ends (consent_until, migration 0032)
- Accounts warns two weeks ahead, says Needs attention once it ran out, and offers
  Link again; an expired or revoked session no longer shows a raw API error
- accounts and rows are keyed on identification_hash, which stays the same across
  links (the uid doesn't), so linking again adds no copies and keeps edits
- links made with the per-link uid move to the stable key on their next sync
- linking the same bank again replaces the old connection

Tested against the stand-in: first link, moving old IDs, linking again,
the warning and an expired permission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MangaValkandClaude Opus 5.5 committed 2026-11-19 17:23:49 +01:00
1 parent 0a97ddbcae
commit 514b2aac77
8 files changed
+88 -15

No files matched your search

+3 -1
View File
@@ -76,7 +76,9 @@ Know before you start:
- **It isn't fully local.** Your transactions pass through Enable Banking's servers on their way to your database.
- **Restricted mode is for your own accounts.** Enable Banking calls it "individual non-commercial use". Their docs don't list a price; check their site.
- **Access runs out.** ING lets it last up to 180 days. Then you approve again in brokeless.
- **Access runs out.** ING lets it last up to 180 days. Two weeks before, Accounts warns you; after, it says "Needs attention". Press **Link again** and approve at the bank: your accounts, history and edits stay, nothing is added twice.
- **Usually only payment accounts.** Banks must share payment accounts. Dutch banks often leave savings out, and investment accounts are never included. Keep importing statements for those.
- **A linked account and a CSV account are two accounts.** Where both cover the same days, those transactions count twice. Delete the CSV account once the link covers its history, or keep only the older part of the CSV.
- **Not yet tried against the real service.** It's checked against Enable Banking's API docs and tested with a stand-in. If the first link fails, the error is in the broke container's log (`docker logs brokeless-broke-1`).
### 1. Make an Enable Banking app