Repository navigation
Releases: sandymac/grav-plugin-gdrive-auth
Releases · sandymac/grav-plugin-gdrive-auth
Release list
1.0.1
-
- Account names, OAuth states and Google Cloud project IDs are matched with PCRE's
Dmodifier, so a value with a trailing newline is refused instead of slipping past$(noted in the GPM review, getgrav/grav#4348).
- Account names, OAuth states and Google Cloud project IDs are matched with PCRE's
-
- The Accounts tab's Remove confirmation uses Admin2's dialog only; the
window.confirmfallback is gone now that admin2 2.1.24+ is a declared dependency. - The README and the OAuth guide say that the redirect URI follows
system.custom_base_urlwhen set and the current request otherwise, so sites behind a proxy or CDN know to set it.
- The Accounts tab's Remove confirmation uses Admin2's dialog only; the
1.0.0
-
- Initial public release: Google sign-in for the Grav 2 Google Drive plugin family. Connect a Google account once and every plugin built on it (gdrive-images, gdrive-backup) uses it. No Composer dependencies: curl and
openssl_signonly. - Two kinds of account: service accounts (hand-signed RS256 JWT) and OAuth user accounts through the site's own Google "Web application" client, with PKCE S256, offline access,
include_granted_scopesand revoke. Sign-in and token requests go only to Google's own endpoints, whatever an uploaded JSON says. - Account registry:
plugins.gdrive-auth.accounts.<name>.typein config; keys, clients and refresh tokens inuser/data/gdrive/auth/<name>.{sa,client,token}.json, written atomically with mode 0600 and never returned by any endpoint. Account names are validated before any file path is built. - Public OAuth callback at
/gdrive-oauth/callback, trusting only a single-use, 10-minute, server-side state; every failure is a generic 400 with the reason in the log. - Thin Drive v3 client (
request,paginate,children,findByAppProperty,ensureFolder,download, resumable single-PUTupload,trash,about) with Shared Drive support on every call, a 401 → refresh-once retry and backoff on 429/5xx.DriveExceptioncarries Google's errorreasonand a Troubleshooting anchor. onGdriveScopesevent for dependent plugins to declare the account and scopes they need.Gdrive::drive()refuses a scope an OAuth account hasn't granted (scope_not_granted); a granteddrivecoversdrive.fileanddrive.readonly.- Admin2 settings page (Plugins → Google Drive Auth): Start here (which kind of account, a per-account checklist, who uses what), Guided setup (a few questions, then only the steps that apply, with every Cloud console link opening your project), Accounts (add by upload or paste, Test, Connect/Reconnect in a popup, Remove), and the full OAuth, Service account and Troubleshooting guides with this site's redirect URI, service-account emails and needed scopes filled in. The guides live once, in
docs/setup/*.md. - Admin2 endpoints under
/api/v1/gdrive(list, add, remove, test, connect, guide), all behind theapi.gdrive.managepermission; errors are problem+json with the reasoncodeand the Troubleshootinganchor. Setupblueprint helpers for dependent plugins:accountOptions()for an account picker andconsumerNotice()for a "Uses Google Drive account … · Set up Google Drive access →" line.tests/smoke.php(JWT, PKCE, state single-use and expiry, scope enforcement, retry and 401 logic, upload request shape, pinned endpoints, error parsing, name and credential validation, the settings page's rows and guides, a Troubleshooting anchor for every reason code, version drift), PHPStan level 6 (against Grav 2.0.23 and the current 2.2 release) and yamllint, all in CI.
- Initial public release: Google sign-in for the Grav 2 Google Drive plugin family. Connect a Google account once and every plugin built on it (gdrive-images, gdrive-backup) uses it. No Composer dependencies: curl and
0.1.15
Improved
- Credentials moved from
user/data/gdrive/into itsauth/subdirectory (user/data/gdrive/auth/<name>.{sa,client,token,test}.jsonandoauth-state/): the family's data directory gets one subdirectory per plugin, and a backup exclusion of/user/data/gdrive/authcovers exactly the secrets. - Upgrade: move the files by hand: create
user/data/gdrive/auth/writable by the web server, then move*.sa.json,*.client.json,*.token.json,*.test.jsonandoauth-state/into it. There is no automatic migration.