@choosemycompany/lib 0.8.1 → 0.9.0
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/README.md +1 -1
- package/dist/auth/useAuthSession.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ The sandbox uses a Vite alias `@choosemycompany/lib` → `../src/index.ts`, so e
|
|
|
40
40
|
|
|
41
41
|
### The `/auth` page
|
|
42
42
|
|
|
43
|
-
It exercises `useAuthSession` against a mocked auth backend: `POST /auth/api/v2/login`, `POST /auth/api/v2/
|
|
43
|
+
It exercises `useAuthSession` against a mocked auth backend: `POST /auth/api/v2/login`, `POST /auth/api/v2/session/tokens` and `POST /auth/api/v2/logout` served at the **origin** like the real auth-api, a protected resource under `/api/session/protected`, and `POST /api/session/simulate` to age the session without waiting 4 h.
|
|
44
44
|
|
|
45
45
|
The scenario: sign in, call the protected API, expire the token, call again. The app writes a single `http.get` and the trace shows three calls — the `401`, the renewal, the replay.
|
|
46
46
|
|
|
@@ -4,7 +4,7 @@ import { SessionExpiryReason } from './types';
|
|
|
4
4
|
* declared base URL, never appended to it: that base URL may carry a path
|
|
5
5
|
* prefix, while the auth API always sits at this path on the origin. Internal.
|
|
6
6
|
*/
|
|
7
|
-
export declare const REFRESH_URI = "/auth/api/v2/
|
|
7
|
+
export declare const REFRESH_URI = "/auth/api/v2/session/tokens";
|
|
8
8
|
/**
|
|
9
9
|
* Path prefix of the auth API. A call to it is never renewed and replayed: it
|
|
10
10
|
* speaks *about* the session rather than relying on it, so a `401` from `login`
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ function D(e) {
|
|
|
25
25
|
}
|
|
26
26
|
return i;
|
|
27
27
|
}
|
|
28
|
-
const V = "/auth/api/v2/
|
|
28
|
+
const V = "/auth/api/v2/session/tokens", J = "/auth/api/v2/", j = "cmc-auth-session-refresh", _ = F("cmc-auth-session", () => {
|
|
29
29
|
const e = w(!1), a = w(!1), i = w(void 0);
|
|
30
30
|
let t, n = 0;
|
|
31
31
|
const s = R(() => e.value && !a.value);
|
package/package.json
CHANGED