Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Releases: arcanelabsio/drive_sync_flutter

v1.2.0

17 Apr 17:25

Choose a tag to compare

What's new

  • Three OAuth scope modes. GoogleDriveAdapter now supports all three Google Drive scopes via explicit named constructors — the consumer chooses the compliance posture.
    • GoogleDriveAdapter.userDrive(basePath:, subPath:) — full drive scope. Arbitrary base path. Required when files are written by multiple OAuth clients (mobile + CLI + Drive Desktop). Triggers Google OAuth verification + annual CASA.
    • GoogleDriveAdapter.appFiles(folderName:, subPath:)drive.file scope. App sees only files it created. Non-sensitive scope, no CASA.
    • GoogleDriveAdapter.appData(subPath:)drive.appdata scope. Hidden per-OAuth-client folder inside `appDataFolder`. Non-sensitive scope, no CASA.
  • `DriveScope` enum exported so consumers can inspect `adapter.scope`.
  • `DriveScopeError` — 401/403 Drive API errors are now translated into a clear scope-mismatch error with a remediation message instead of raw `DetailedApiRequestError`.
  • `SandboxValidator` refactor — split structural path validation (always on) from the `.app/{appName}` naming convention.
  • 45 new tests covering all three modes and legacy constructor backward compatibility.

Backward compatibility

All existing constructors (`GoogleDriveAdapter.sandboxed()`, `GoogleDriveAdapter()`, `GoogleDriveAdapter.withPath()`) still work. `.sandboxed()` now emits a deprecation warning pointing to the new API. Migration is a 1:1 call-site rewrite.

Choosing a scope

Use case Constructor CASA required?
Mobile + CLI + Drive Desktop all write files `.userDrive()` Yes, annually
Single-writer app, public distribution `.appFiles()` No
Hidden app state, no user visibility `.appData()` No

See the README for the full comparison and CASA tradeoff discussion.