@owlmeans/web-oidc-provider 0.1.18-rc.4 → 0.1.18-rc.41

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
@@ -13,7 +13,7 @@ Browser-side state for an embedded OIDC provider's interaction screens (login, c
13
13
  ## Installation
14
14
 
15
15
  ```bash
16
- bun add @owlmeans/web-oidc-provider
16
+ bun add @owlmeans/web-oidc-provider@^0.1.18-rc.41
17
17
  ```
18
18
 
19
19
  ## Usage
@@ -63,7 +63,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
63
63
  your project's skill store (`.agents/skills/`):
64
64
 
65
65
  ```sh
66
- npx @owlmeans/agent-skills
66
+ npx @owlmeans/agent-skills@^0.1.18-rc.31
67
67
  ```
68
68
 
69
69
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/web-oidc-provider",
4
- "version": "0.1.18-rc.0",
5
- "generatedAt": "2026-08-16T22:20:50.512Z",
4
+ "version": "0.1.18-rc.41",
5
+ "generatedAt": "2026-09-21T21:54:22.971Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: web-oidc-provider
3
- description: How to use @owlmeans/web-oidc-provider — browser-side state and helpers for an embedded OIDC provider UI (consent, login screens). Auto-invoked when importing OIDC provider state primitives in a web app.
3
+ description: How to use @owlmeans/web-oidc-provider — the browser state model behind an embedded OIDC provider's interaction screens — the interaction uid cookie, the interaction stack, and the OidcAuthState flags a login or consent screen branches on. Auto-invoked when building or changing OIDC provider interaction screens in a web app.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,24 +8,85 @@ user-invocable: false
8
8
  # @owlmeans/web-oidc-provider
9
9
 
10
10
  **Layer:** Web (React)
11
- **Install:** `"@owlmeans/web-oidc-provider": "^0.1.18-rc.0"` in `dependencies`
11
+ **Install:** `"@owlmeans/web-oidc-provider": "^0.1.18-rc.41"` in `dependencies`
12
+
13
+ The browser side of an application that **hosts** the OIDC provider screens — the login and consent
14
+ pages `oidc-provider` redirects to. An application that merely signs in against someone else's issuer
15
+ wants `@owlmeans/web-oidc-rp` instead.
12
16
 
13
17
  ## Key Exports
14
18
 
15
19
  | Export | Description |
16
20
  |--------|-------------|
17
- | `auth-state` helpers | OIDC provider login/consent state |
18
- | Types | Provider UI types |
19
- | Constants | Provider state aliases |
21
+ | `makeAuthStateModel(context, updateState)` | Builds the model for one interaction. `updateState(uid)` is the caller's round trip to the provider, resolving `{ entityId?, did? }` |
22
+ | `OidcAuthStateModel` | `init`, `updateAuthState`, `finishInteraction`, `getState`, and the six predicates below |
23
+ | `OidcAuthState` | The flag enum: `Authenticated`, `SameEntity`, `IdLinked`, `Simplified` — plus `ProfileExists` and `RegistrationAllowed`, which the model never sets |
24
+ | `AuthStateProperties` | The model's data half: `{ uid, state, entityId?, did? }` |
25
+ | `OidcInteraction` | The stacked-interaction record: `{ id, stack: { uid, token }[] }` |
26
+ | `WithSharedConfig` | `{ oidc: OidcSharedConfig }` — the config shape this package requires |
20
27
 
21
28
  ## Usage
22
29
 
23
- Use this only when your app hosts the OIDC provider screens (login, consent). For relying-party usage in a web app, use `@owlmeans/web-oidc-rp` instead.
24
-
25
30
  ```typescript
26
- import { authState } from '@owlmeans/web-oidc-provider'
31
+ import { makeAuthStateModel } from '@owlmeans/web-oidc-provider'
32
+
33
+ const model = makeAuthStateModel(context, async uid => await loadInteraction(uid))
34
+ await model.init(uid)
35
+
36
+ if (!model.isAuthenticated()) return <LoginScreen />
37
+ if (!model.isSameEntity()) return <SwitchOrganizationScreen entityId={model.entityId} />
38
+ await model.finishInteraction()
27
39
  ```
28
40
 
41
+ Read the flags through the predicates — `isAuthenticated`, `isSameEntity`, `isIdLinked`,
42
+ `isSimplified`, `profileExists`, `isRegistrationAllowed` — rather than inspecting `state` directly;
43
+ `getState()` returns the whole set only for diagnostics.
44
+
45
+ `updateAuthState` adds four flags and only four: `Authenticated`, `SameEntity`, `IdLinked` and
46
+ `Simplified`. **`profileExists()` and `isRegistrationAllowed()` therefore always return `false`** —
47
+ the enum members exist and nothing ever adds them — so a screen must not branch on either as though
48
+ it reported something. Decide "does this subject already have a profile" from the round trip the
49
+ caller passes to `makeAuthStateModel`, not from the state set.
50
+
51
+ ## The uid, the cookie and the stack
52
+
53
+ `init(uid)` is the entry point and it does more than store an argument:
54
+
55
+ - A uid of `'-'` means "whatever interaction this browser is already in": the value is taken from the
56
+ interaction cookie. Its name comes from `cfg.oidc.clientCookie.interaction.name` (default
57
+ `_interaction`) and its lifetime from `.ttl` in seconds (default 3600).
58
+ - Arriving with a **different** uid while a cookie is set is meant to push the current uid and its
59
+ auth token onto an interaction stack in the auth store, so a nested authorization can return to the
60
+ one it interrupted. The push only happens when the store already holds the stack record, and
61
+ nothing ever creates it — the source marks the branch with its own `@TODO`. So in practice the
62
+ stack stays absent, nothing is pushed, and `finishInteraction()` finds nothing to pop. Treat
63
+ returning to an interrupted interaction as unimplemented rather than as behaviour to rely on;
64
+ `init(uid, true)` is the reset argument for the same branch.
65
+ - The computed state is memoised per uid in module scope, for the life of the document — the memo is
66
+ shared by every model built in that document. `init` returns the memo without touching the cookie
67
+ when one exists; `updateAuthState(uid)` recomputes and rewrites it; `finishInteraction()` deletes
68
+ the current uid's memo.
69
+
70
+ `Simplified` is not derived from the interaction. `updateAuthState` sets it when the `FLOW_STATE`
71
+ resource (`@owlmeans/client-flow`) holds an `EXTRA_FLOW` record whose `payload.simplified` is the
72
+ string `'true'`, and `finishInteraction()` deletes that record. Nothing in the OwlMeans packages
73
+ writes it — the relying party's own `simplified` rides on the authorization URL as a query param and
74
+ never reaches this record — so a host application that wants simplified screens has to save the
75
+ extra-flow record itself.
76
+
77
+ ## Rules
78
+
79
+ - `cfg.oidc` must exist before the model is built; the cookie configuration is read eagerly.
80
+ - `entityId` falls back to `cfg.defaultEntityId` when the interaction names none, so a screen must
81
+ not treat a present `entityId` as proof that the interaction was organization-scoped.
82
+ - `finishInteraction(true)` skips recomputing state after popping — use it when the caller navigates
83
+ away immediately, and the default otherwise.
84
+
29
85
  ## Depends On
30
86
 
31
- - `@owlmeans/oidc`, `@owlmeans/web-client`, `@owlmeans/web-panel`
87
+ - `@owlmeans/oidc`, `@owlmeans/web-client`, `@owlmeans/client-flow`, `@owlmeans/auth`,
88
+ `@owlmeans/resource`, `universal-cookie`
89
+ - `react` (peer)
90
+
91
+ The server half is `@owlmeans/server-oidc-provider`, which is what redirects a browser to these
92
+ screens through its `interactions.url`.
@@ -1 +1 @@
1
- {"version":3,"file":"auth-state.d.ts","sourceRoot":"","sources":["../src/auth-state.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjE,OAAO,KAAK,EAAuB,kBAAkB,EAAqC,MAAM,YAAY,CAAA;AAG5G,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,WACpE,CAAC,eACG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,KACzE,kBAsIF,CAAA"}
1
+ {"version":3,"file":"auth-state.d.ts","sourceRoot":"","sources":["../src/auth-state.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjE,OAAO,KAAK,EAAuB,kBAAkB,EAAqC,MAAM,YAAY,CAAA;AAG5G,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,WACpE,CAAC,eACG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,KACzE,kBAsIF,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { entitySlugOf } from '@owlmeans/auth';
1
2
  import { EXTRA_FLOW, FLOW_STATE } from '@owlmeans/client-flow';
2
3
  import Cookies from 'universal-cookie';
3
4
  import { OidcAuthState } from './consts.js';
@@ -62,7 +63,7 @@ export const makeAuthStateModel = (context, updateState) => {
62
63
  user = context.auth().user();
63
64
  model.state.add(OidcAuthState.Authenticated);
64
65
  }
65
- if (model.entityId === user?.entityId) {
66
+ if (model.entityId === entitySlugOf(user)) {
66
67
  model.state.add(OidcAuthState.SameEntity);
67
68
  }
68
69
  if (model.did != null) {
@@ -1 +1 @@
1
- {"version":3,"file":"auth-state.js","sourceRoot":"","sources":["../src/auth-state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAE9D,OAAO,OAAO,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,MAAM,UAAU,GAAwC,EAAE,CAAA;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAU,EACV,WAA0E,EACtD,EAAE;IACtB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;IAChD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAoE,CAAA;IAE3F,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAmB,CAAA;IAE3D,MAAM,QAAQ,GAAG,yBAAyB,CAAA;IAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,EAAE,IAAI,IAAI,c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
  {
2
2
  "name": "@owlmeans/web-oidc-provider",
3
- "version": "0.1.18-rc.4",
3
+ "version": "0.1.18-rc.41",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,11 +21,11 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@owlmeans/auth": "^0.1.18-rc.4",
25
- "@owlmeans/client-flow": "^0.1.18-rc.4",
26
- "@owlmeans/oidc": "^0.1.18-rc.4",
27
- "@owlmeans/resource": "^0.1.18-rc.4",
28
- "@owlmeans/web-client": "^0.1.18-rc.4",
24
+ "@owlmeans/auth": "^0.1.18-rc.29",
25
+ "@owlmeans/client-flow": "^0.1.18-rc.36",
26
+ "@owlmeans/oidc": "^0.1.18-rc.39",
27
+ "@owlmeans/resource": "^0.1.18-rc.29",
28
+ "@owlmeans/web-client": "^0.1.18-rc.43",
29
29
  "universal-cookie": "^7.2.1"
30
30
  },
31
31
  "peerDependencies": {
package/src/auth-state.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { Auth } from '@owlmeans/auth'
2
+ import { entitySlugOf } from '@owlmeans/auth'
2
3
  import type { StateResource } from '@owlmeans/client-flow'
3
4
  import { EXTRA_FLOW, FLOW_STATE } from '@owlmeans/client-flow'
4
5
  import type { AppConfig, AppContext } from '@owlmeans/web-client'
@@ -85,7 +86,7 @@ export const makeAuthStateModel = <C extends AppConfig, T extends AppContext<C>>
85
86
  model.state.add(OidcAuthState.Authenticated)
86
87
  }
87
88
 
88
- if (model.entityId === user?.entityId) {
89
+ if (model.entityId === entitySlugOf(user)) {
89
90
  model.state.add(OidcAuthState.SameEntity)
90
91
  }
91
92
 
package/build/.gitkeep DELETED
File without changes