or3-provider-basic-auth 0.0.20 → 0.0.21
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
CHANGED
|
@@ -358,8 +358,8 @@ The updated host and SQLite or Convex store must provide short-code resolution.
|
|
|
358
358
|
|
|
359
359
|
### Session and account feedback
|
|
360
360
|
|
|
361
|
-
The sidebar reads the host's shared session and emits `or3:auth-session-changed` after sign-in, registration, sign-out, or a password change. The host owns refreshing the session and deciding whether account changes require a reload. Session probes disable automatic request retries.
|
|
361
|
+
The sidebar reads the host's shared session and emits `or3:auth-session-changed` after sign-in, registration, sign-out, or a password change. The host owns refreshing the session and deciding whether account changes require a reload. After sign-in from a signed-out page, the host can defer publishing the session until the reload so the new page starts sync once. It publishes confirmed sign-outs and account or workspace switches before reload so local cleanup can run. Session probes disable automatic request retries and report an indeterminate status when the session endpoint fails. If the auth-change refresh is rate-limited, its notification displays the server’s retry window and permits retry after it ends.
|
|
362
362
|
|
|
363
363
|
Invite-only registration marks the code as required before submission. Invalid or expired invitation messages explain the next step for the current registration mode. Sign-out also clears the pending invitation cookie so it cannot apply to another signup. Password changes explain that all sessions are revoked, report incorrect-password and rate-limit errors, and show a one-time confirmation on the sign-in screen.
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
Indeterminate session status requires `or3-provider-basic-auth@0.0.21` or later and a host that handles the indeterminate result.
|
package/dist/module.json
CHANGED
|
@@ -21,7 +21,8 @@ export default defineNuxtPlugin(() => {
|
|
|
21
21
|
registerClientSessionRecovery(async () => silentRefreshOnce());
|
|
22
22
|
registerClientAuthStatusResolver(async () => {
|
|
23
23
|
const first = await fetchSession();
|
|
24
|
-
|
|
24
|
+
if (!first) return { ready: true, authenticated: void 0 };
|
|
25
|
+
const firstSession = first.session;
|
|
25
26
|
if (firstSession?.authenticated === true && firstSession.provider === "basic-auth") {
|
|
26
27
|
return { ready: true, authenticated: true };
|
|
27
28
|
}
|
|
@@ -30,7 +31,8 @@ export default defineNuxtPlugin(() => {
|
|
|
30
31
|
return { ready: true, authenticated: false };
|
|
31
32
|
}
|
|
32
33
|
const second = await fetchSession();
|
|
33
|
-
|
|
34
|
+
if (!second) return { ready: true, authenticated: void 0 };
|
|
35
|
+
const secondSession = second.session;
|
|
34
36
|
const authenticated = secondSession?.authenticated === true && secondSession.provider === "basic-auth";
|
|
35
37
|
return { ready: true, authenticated };
|
|
36
38
|
});
|