[pull] main from tinacms:main - #270
Merged
Merged
Conversation
Closes #7135 **TL;DR** Broadens the `@tinacms/astro` `astro` peer dependency to include Astro 7, so installs on Astro 7 stop failing with `ERESOLVE`. No source changes were needed, the package is already compatible. **Pain:** Astro 7 (Vite 8, new Rust compiler) shipped, but `@tinacms/astro@0.5.1`'s peer range stopped at `^5.0.0 || ^6.0.0`. Anyone on Astro 7 hit a hard `ERESOLVE` on install, including the official `tinacms init` flow, which shells out to a bare `npm install` with no hook to pass `--legacy-peer-deps`. Users were pinned a major behind, off the latest Astro security and ecosystem updates, with no clean workaround. **Solution:** Widen the peer range to `^5.0.0 || ^6.0.0 || ^7.0.0` and bump the package's own `astro`/`vite` devDeps to 7/8 so its test suite runs on Astro 7. The `examples/astro/visual-editing` reference app (which consumes `@tinacms/astro`) is bumped to Astro 7 so CI exercises it end-to-end. One snapshot updates for Astro 7's inter-tag whitespace compression, with tag structure, attributes and content unchanged. `examples/astro/kitchen-sink` stays on Astro 6 for now: it uses its own integration rather than `@tinacms/astro`, and moving it to Vite 8 needs a separate Tailwind PostCSS-to-Vite-plugin migration. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
## Summary `isAuthorized` now validates the token against the site's own configured clientID instead of a value read from the request. It takes an optional `expectedClientID`, falls back to `process.env.NEXT_PUBLIC_TINA_CLIENT_ID`, and refuses when neither is available. `TinaCloudBackendAuthProvider` passes the configured clientID through. ## Changes - `@tinacms/auth`: `isAuthorized` / `TinaCloudBackendAuthProvider` use the site clientID - `next-tinacms-azure`: same change in its `isAuthorized` - `@tinacms/cli`: `init` generates `TinaCloudBackendAuthProvider(process.env.NEXT_PUBLIC_TINA_CLIENT_ID)` - Media store READMEs (cloudinary / s3 / dos): examples pass the site clientID ## Testing - `@tinacms/auth` unit tests updated and passing (14/14) - Lint and build pass for the affected packages --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: kulesy <kulewidak@gmail.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @tinacms/astro@0.6.0 ### Minor Changes - [#7163](#7163) [`c2c03c6`](c2c03c6) Thanks [@kulesy](https://github.com/kulesy)! - Add official support for Astro 7. The `astro` peer dependency is now `^5.0.0 || ^6.0.0 || ^7.0.0`, so Astro 5 and 6 consumers continue to work without changes. The package's own test suite and the `examples/astro/visual-editing` reference app (which consumes `@tinacms/astro`) have been bumped to Astro 7 to exercise the new version in CI. The `examples/astro/kitchen-sink` app stays on Astro 6 for now, since moving it to Astro 7 (Vite 8) needs a separate Tailwind PostCSS-to-Vite-plugin migration and it uses its own integration rather than `@tinacms/astro`. ## @tinacms/auth@1.1.4 ### Patch Changes - [#7168](#7168) [`0a927a4`](0a927a4) Thanks [@Aibono1225](https://github.com/Aibono1225)! - Security fix: TinaCloud authorization is now scoped to the site's own configured clientID instead of a value read from the request. `isAuthorized` takes an optional `expectedClientID` (falling back to `NEXT_PUBLIC_TINA_CLIENT_ID`) and refuses when neither resolves. `TinaCloudBackendAuthProvider`, the `next-tinacms-azure` adapter, and the `tinacms init` template all pass the site clientID through. **Action required (self-hosted).** Authorization now fails closed when the site's clientID cannot be resolved at runtime. Ensure `NEXT_PUBLIC_TINA_CLIENT_ID` is present in the server runtime (not only inlined at build time), or pass the clientID explicitly to `TinaCloudBackendAuthProvider(...)` and to media-store `authorized` callbacks, e.g. `isAuthorized(req, process.env.NEXT_PUBLIC_TINA_CLIENT_ID)`. If it cannot be resolved, backend and media authorization will return 401. ## @tinacms/cli@2.5.4 ### Patch Changes - [#7168](#7168) [`0a927a4`](0a927a4) Thanks [@Aibono1225](https://github.com/Aibono1225)! - Security fix: TinaCloud authorization is now scoped to the site's own configured clientID instead of a value read from the request. `isAuthorized` takes an optional `expectedClientID` (falling back to `NEXT_PUBLIC_TINA_CLIENT_ID`) and refuses when neither resolves. `TinaCloudBackendAuthProvider`, the `next-tinacms-azure` adapter, and the `tinacms init` template all pass the site clientID through. **Action required (self-hosted).** Authorization now fails closed when the site's clientID cannot be resolved at runtime. Ensure `NEXT_PUBLIC_TINA_CLIENT_ID` is present in the server runtime (not only inlined at build time), or pass the clientID explicitly to `TinaCloudBackendAuthProvider(...)` and to media-store `authorized` callbacks, e.g. `isAuthorized(req, process.env.NEXT_PUBLIC_TINA_CLIENT_ID)`. If it cannot be resolved, backend and media authorization will return 401. ## next-tinacms-azure@15.0.1 ### Patch Changes - [#7168](#7168) [`0a927a4`](0a927a4) Thanks [@Aibono1225](https://github.com/Aibono1225)! - Security fix: TinaCloud authorization is now scoped to the site's own configured clientID instead of a value read from the request. `isAuthorized` takes an optional `expectedClientID` (falling back to `NEXT_PUBLIC_TINA_CLIENT_ID`) and refuses when neither resolves. `TinaCloudBackendAuthProvider`, the `next-tinacms-azure` adapter, and the `tinacms init` template all pass the site clientID through. **Action required (self-hosted).** Authorization now fails closed when the site's clientID cannot be resolved at runtime. Ensure `NEXT_PUBLIC_TINA_CLIENT_ID` is present in the server runtime (not only inlined at build time), or pass the clientID explicitly to `TinaCloudBackendAuthProvider(...)` and to media-store `authorized` callbacks, e.g. `isAuthorized(req, process.env.NEXT_PUBLIC_TINA_CLIENT_ID)`. If it cannot be resolved, backend and media authorization will return 401. - Updated dependencies [[`0a927a4`](0a927a4)]: - @tinacms/auth@1.1.4 Co-authored-by: release-bot-allow-prs-and-push[bot] <173871997+release-bot-allow-prs-and-push[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )