@aiveth/nextjs 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1 — 2026-11-25
4
+
5
+ - `/auth/branding` is never cached (it was 5 minutes): a Save in Aiveth → Branding shows on
6
+ `AivethButton` at the next page load.
7
+
3
8
  ## 0.4.0 — 2026-11-25
4
9
 
5
10
  - `<AivethButton>` (`@aiveth/nextjs/client`): "Sign in" in the organization's own look
package/README.md CHANGED
@@ -82,4 +82,4 @@ read by the proxy from Aiveth on the server at `/auth/branding`.
82
82
  | `/auth/callback` | Aiveth's answer: checks it and writes the session |
83
83
  | `/auth/logout` | Clears the session, then signs out at Aiveth and comes back |
84
84
  | `/auth/session` | `{ user }` for the browser — never a token |
85
- | `/auth/branding` | The organization's look for `AivethButton` (public, cached 5 minutes) |
85
+ | `/auth/branding` | The organization's look for `AivethButton` (public, never cached: a Save in Aiveth shows at once) |
package/dist/handlers.js CHANGED
@@ -65,7 +65,8 @@ export async function sessionJson(req, c) {
65
65
  * `/v1/branding/public` for THIS app, fetched here so the browser never needs the client id or
66
66
  * another site. Aiveth's own look when it can't be read; nothing secret either way. */
67
67
  export async function brandingJson(_req, c) {
68
- const headers = { 'Cache-Control': 'public, max-age=300' };
68
+ // Never the old look after a Save in Aiveth (0.4.1; 0.4.0 kept it 5 minutes).
69
+ const headers = { 'Cache-Control': 'no-cache' };
69
70
  try {
70
71
  const res = await (c.fetch ?? fetch)(`${c.baseUrl}/v1/branding/public?${new URLSearchParams({ client_id: c.clientId })}`, { cache: 'no-store' });
71
72
  return NextResponse.json(res.ok ? await res.json() : { custom: false }, { headers });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiveth/nextjs",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Aiveth by Gooclaim for Next.js: sign in on Aiveth's page, an encrypted session cookie, the user on the server and in the browser.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Gooclaim",