WIP: Store per-device user agent for remoteStorage authorizations #257

Draft
raucao wants to merge 2 commits from feature/rs_device_tokens into feature/rs_auth_pkce
pull from: feature/rs_device_tokens
Owner

Second of three PRs for #254. Stacked on #256 (PKCE core) — please review/merge that first.

What

  • Adds a user_agent column to remote_storage_authorizations and rs_authorization_codes, captured at consent, carried on the authorization code, and stored on the authorization at exchange (and directly for the implicit flow).
  • The storage dashboard (#258) uses this to label connected devices.

Because the existing-token reuse shortcut was removed in #256, every authorization is already a distinct per-device token.

Storage-first

Documents the storage-first launch (remoteStorage spec section 11) with an explicit spec: launch_app hands the app only #remotestorage=<address>, never an access token. The app then runs the application-first (now PKCE-capable) flow itself.

Tests

bundle exec rspec — 350 examples, 0 failures.

Part of #254.

Second of three PRs for #254. Stacked on #256 (PKCE core) — please review/merge that first. ## What - Adds a `user_agent` column to `remote_storage_authorizations` and `rs_authorization_codes`, captured at consent, carried on the authorization code, and stored on the authorization at exchange (and directly for the implicit flow). - The storage dashboard (#258) uses this to label connected devices. Because the existing-token reuse shortcut was removed in #256, every authorization is already a distinct per-device token. ## Storage-first Documents the storage-first launch (remoteStorage spec section 11) with an explicit spec: `launch_app` hands the app only `#remotestorage=<address>`, never an access token. The app then runs the application-first (now PKCE-capable) flow itself. ## Tests `bundle exec rspec` — 350 examples, 0 failures. Part of #254.
raucao added the
integration
remotestorage
label 2026-11-02 09:01:53 +00:00
raucao added 1 commit 2026-11-02 12:41:26 +00:00
- Add user_agent to remote_storage_authorizations and rs_authorization_codes
- Capture the browser's user agent at consent, carry it on the authorization
  code, and store it on the authorization when the code is exchanged
- Store it directly for the implicit flow too

With the reuse shortcut gone, each authorization is already a distinct
per-device token; this adds the metadata needed to label and display them.

Part of #254
raucao force-pushed feature/rs_device_tokens from 25856a7ca7 to e3bf932c51 2026-11-02 12:41:26 +00:00 Compare
raucao changed title from Store per-device user agent for remoteStorage authorizations to Per-device remoteStorage tokens: user agent and supersede on consent 2026-11-02 13:07:48 +00:00
raucao added the feature label 2026-11-02 13:26:48 +00:00
raucao added 1 commit 2026-11-02 13:43:48 +00:00
Document the storage-first launch flow
CI / Test (pull_request) Successful in 41s
918d2622c6
Add an explicit spec for the storage-first handoff (remoteStorage spec
section 11): launching an app passes only `#remotestorage=<address>`,
never an access token. The app then runs the application-first
(now PKCE-capable) flow itself.

Part of #254
raucao force-pushed feature/rs_device_tokens from 44e4488a4f to 918d2622c6 2026-11-02 13:43:48 +00:00 Compare
raucao changed title from Per-device remoteStorage tokens: user agent and supersede on consent to Store per-device user agent for remoteStorage authorizations 2026-11-02 13:45:36 +00:00
raucao marked the pull request as work in progress 2026-11-02 19:00:04 +00:00
All checks were successful
CI / Test (pull_request) Successful in 41s
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/rs_device_tokens:feature/rs_device_tokens
git checkout feature/rs_device_tokens
Sign in to join this conversation.