Skip to content

Warn when the Volvo ID connection lasts only an hour - #379

Merged
vcanuel merged 2 commits into
mainfrom
feat/volvo-remember-me
Nov 12, 2026
Merged

vcanuel merged 2 commits into
mainfrom
feat/volvo-remember-me

Conversation

@vcanuel

@vcanuel vcanuel commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

On the new Volvo ID, a sign-in without "Remember me" ticked gives a session that ends an hour after the authorization, however often it is refreshed (refresh_expires_in=1800; 90 days with the box ticked, as measured in #253). Runsten now reads that lifetime when the user connects: when it is short, the vehicles are recorded all the same, and the Connection page asks the user to connect again, ticking the box. The Connect / Reconnect button says so beforehand.

Changes

  • Volvo ID client: the grant carries refresh_expires_in (Keycloak's field, a number or a string), zero when not announced.
  • API: under a day, the callback keeps the connection, logs a warning and comes back with connection?volvo=short_session; runsten-api served alone tells it on its own page too.
  • Front end: the Connection page warns of a short session (Volvo's only), and a line under the Connect / Reconnect button tells to tick "Remember me". Eight locales.
  • Simulator: announces refresh_expires_in (its refresh token TTL): SIM_REFRESH_TOKEN_TTL=30m task run-sim shows a short session, which task connect-sim now accepts.
  • Docs: self-hosting/volvo.md, in "Connecting your Volvo ID" and the move to the new Volvo ID.

Screenshots

Before After
before after
before after
  1. The Volvo ID's section: the line about "Remember me" under the button.
  2. Coming back from a sign-in whose refresh token lives 30 minutes (the simulator with SIM_REFRESH_TOKEN_TTL=30m): the warning, where main says nothing.

Tests

  • task unit passed: fmt, lint (0 issues), Go tests without PostgreSQL, govulncheck, build; web lint, Vitest (1852 tests), audit, build.
  • Checked end to end against the simulator: task connect-sim comes back with short_session, the log tells refresh_expires_in=30m0s.
  • Not run locally: task integration and task system (the CI runs them). Not checked on a real Volvo yet.

Closes #320

🤖 Generated with Claude Code

vcanuel and others added 2 commits November 12, 2026 21:10
Keycloak announces the refresh token's lifetime (refresh_expires_in): without
"Remember me" ticked on Volvo's sign-in page, the session ends an hour after
the authorization whatever the refreshes. The connection is kept, and the
Connection page asks to connect again ticking the box; the button says so
beforehand. The simulator announces the lifetime, and connect-sim accepts a
short session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f036fca and aabeb82.

Files selected for processing: 19

  • Taskfile.yml
  • documentation/self-hosting/volvo.md
  • internal/api/session.go
  • internal/api/volvo.go
  • internal/api/volvo_test.go
  • internal/oauth/oauth.go
  • internal/simulator/volvoapi/oauth.go
  • internal/volvo/auth.go
  • internal/volvo/auth_test.go
  • web/src/pages/connection/ui/ConnectionPage.vue
  • web/src/shared/i18n/locales/de.json
  • web/src/shared/i18n/locales/en.json
  • web/src/shared/i18n/locales/es.json
  • web/src/shared/i18n/locales/fr.json
  • web/src/shared/i18n/locales/it.json
  • web/src/shared/i18n/locales/nb.json
  • web/src/shared/i18n/locales/nl.json
  • web/src/shared/i18n/locales/sv.json
  • web/test/pages/connection/ConnectionPage.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@vcanuel

vcanuel commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@vcanuel
vcanuel merged commit 445b819 into main Nov 12, 2026
8 checks passed
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.

Volvo ID: warn when the connection lasts only an hour ("Remember me" not ticked)

1 participant