@chipmobilesdk/rn-auth 0.5.0 → 0.6.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.
Files changed (167) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +8 -5
  3. package/lib/commonjs/access/accessTier.js +111 -0
  4. package/lib/commonjs/access/accessTier.js.map +1 -0
  5. package/lib/commonjs/app-auth.js +13 -0
  6. package/lib/commonjs/app-auth.js.map +1 -0
  7. package/lib/commonjs/config/types.js +50 -0
  8. package/lib/commonjs/config/types.js.map +1 -0
  9. package/lib/commonjs/config/validateConfig.js +114 -0
  10. package/lib/commonjs/config/validateConfig.js.map +1 -0
  11. package/lib/commonjs/core/authMachine.js +406 -0
  12. package/lib/commonjs/core/authMachine.js.map +1 -0
  13. package/lib/commonjs/core/profile.js +59 -0
  14. package/lib/commonjs/core/profile.js.map +1 -0
  15. package/lib/commonjs/core/session.js +125 -0
  16. package/lib/commonjs/core/session.js.map +1 -0
  17. package/lib/commonjs/diagnostics/errors.js +83 -0
  18. package/lib/commonjs/diagnostics/errors.js.map +1 -0
  19. package/lib/commonjs/diagnostics/messageKeys.js +51 -0
  20. package/lib/commonjs/diagnostics/messageKeys.js.map +1 -0
  21. package/lib/commonjs/index.js +175 -0
  22. package/lib/commonjs/index.js.map +1 -0
  23. package/lib/commonjs/keychain.js +13 -0
  24. package/lib/commonjs/keychain.js.map +1 -0
  25. package/lib/commonjs/oidc/authClient.js +157 -0
  26. package/lib/commonjs/oidc/authClient.js.map +1 -0
  27. package/lib/commonjs/oidc/classifyError.js +65 -0
  28. package/lib/commonjs/oidc/classifyError.js.map +1 -0
  29. package/lib/commonjs/oidc/socialRouting.js +58 -0
  30. package/lib/commonjs/oidc/socialRouting.js.map +1 -0
  31. package/lib/commonjs/package.json +1 -0
  32. package/lib/commonjs/react/AuthProvider.js +37 -0
  33. package/lib/commonjs/react/AuthProvider.js.map +1 -0
  34. package/lib/commonjs/react/hooks.js +122 -0
  35. package/lib/commonjs/react/hooks.js.map +1 -0
  36. package/lib/commonjs/testing/conformance.js +148 -0
  37. package/lib/commonjs/testing/conformance.js.map +1 -0
  38. package/lib/commonjs/testing/index.js +53 -0
  39. package/lib/commonjs/testing/index.js.map +1 -0
  40. package/lib/commonjs/tokens/accessToken.js +165 -0
  41. package/lib/commonjs/tokens/accessToken.js.map +1 -0
  42. package/lib/commonjs/tokens/secureStore.js +60 -0
  43. package/lib/commonjs/tokens/secureStore.js.map +1 -0
  44. package/lib/module/access/accessTier.js +106 -0
  45. package/lib/module/access/accessTier.js.map +1 -0
  46. package/lib/module/app-auth.js +9 -0
  47. package/lib/module/app-auth.js.map +1 -0
  48. package/lib/module/config/types.js +46 -0
  49. package/lib/module/config/types.js.map +1 -0
  50. package/lib/module/config/validateConfig.js +110 -0
  51. package/lib/module/config/validateConfig.js.map +1 -0
  52. package/lib/module/core/authMachine.js +402 -0
  53. package/lib/module/core/authMachine.js.map +1 -0
  54. package/lib/module/core/profile.js +54 -0
  55. package/lib/module/core/profile.js.map +1 -0
  56. package/lib/module/core/session.js +118 -0
  57. package/lib/module/core/session.js.map +1 -0
  58. package/lib/module/diagnostics/errors.js +74 -0
  59. package/lib/module/diagnostics/errors.js.map +1 -0
  60. package/lib/module/diagnostics/messageKeys.js +46 -0
  61. package/lib/module/diagnostics/messageKeys.js.map +1 -0
  62. package/lib/module/index.js +33 -0
  63. package/lib/module/index.js.map +1 -0
  64. package/lib/module/keychain.js +9 -0
  65. package/lib/module/keychain.js.map +1 -0
  66. package/lib/module/oidc/authClient.js +152 -0
  67. package/lib/module/oidc/authClient.js.map +1 -0
  68. package/lib/module/oidc/classifyError.js +60 -0
  69. package/lib/module/oidc/classifyError.js.map +1 -0
  70. package/lib/module/oidc/socialRouting.js +52 -0
  71. package/lib/module/oidc/socialRouting.js.map +1 -0
  72. package/lib/module/package.json +1 -0
  73. package/lib/module/react/AuthProvider.js +31 -0
  74. package/lib/module/react/AuthProvider.js.map +1 -0
  75. package/lib/module/react/hooks.js +111 -0
  76. package/lib/module/react/hooks.js.map +1 -0
  77. package/lib/module/testing/conformance.js +140 -0
  78. package/lib/module/testing/conformance.js.map +1 -0
  79. package/lib/module/testing/index.js +25 -0
  80. package/lib/module/testing/index.js.map +1 -0
  81. package/lib/module/tokens/accessToken.js +161 -0
  82. package/lib/module/tokens/accessToken.js.map +1 -0
  83. package/lib/module/tokens/secureStore.js +56 -0
  84. package/lib/module/tokens/secureStore.js.map +1 -0
  85. package/lib/typescript/commonjs/access/accessTier.d.ts +14 -0
  86. package/lib/typescript/commonjs/access/accessTier.d.ts.map +1 -0
  87. package/lib/typescript/commonjs/app-auth.d.ts +7 -0
  88. package/lib/typescript/commonjs/app-auth.d.ts.map +1 -0
  89. package/lib/typescript/commonjs/config/types.d.ts +171 -0
  90. package/lib/typescript/commonjs/config/types.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/config/validateConfig.d.ts +8 -0
  92. package/lib/typescript/commonjs/config/validateConfig.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/core/authMachine.d.ts +14 -0
  94. package/lib/typescript/commonjs/core/authMachine.d.ts.map +1 -0
  95. package/lib/typescript/commonjs/core/profile.d.ts +15 -0
  96. package/lib/typescript/commonjs/core/profile.d.ts.map +1 -0
  97. package/lib/typescript/commonjs/core/session.d.ts +60 -0
  98. package/lib/typescript/commonjs/core/session.d.ts.map +1 -0
  99. package/lib/typescript/commonjs/diagnostics/errors.d.ts +37 -0
  100. package/lib/typescript/commonjs/diagnostics/errors.d.ts.map +1 -0
  101. package/lib/typescript/commonjs/diagnostics/messageKeys.d.ts +57 -0
  102. package/lib/typescript/commonjs/diagnostics/messageKeys.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/index.d.ts +27 -0
  104. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/keychain.d.ts +7 -0
  106. package/lib/typescript/commonjs/keychain.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/oidc/authClient.d.ts +75 -0
  108. package/lib/typescript/commonjs/oidc/authClient.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/oidc/classifyError.d.ts +28 -0
  110. package/lib/typescript/commonjs/oidc/classifyError.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/oidc/socialRouting.d.ts +22 -0
  112. package/lib/typescript/commonjs/oidc/socialRouting.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/package.json +1 -0
  114. package/lib/typescript/commonjs/react/AuthProvider.d.ts +17 -0
  115. package/lib/typescript/commonjs/react/AuthProvider.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/react/hooks.d.ts +42 -0
  117. package/lib/typescript/commonjs/react/hooks.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/testing/conformance.d.ts +32 -0
  119. package/lib/typescript/commonjs/testing/conformance.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/testing/index.d.ts +11 -0
  121. package/lib/typescript/commonjs/testing/index.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/tokens/accessToken.d.ts +45 -0
  123. package/lib/typescript/commonjs/tokens/accessToken.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/tokens/secureStore.d.ts +26 -0
  125. package/lib/typescript/commonjs/tokens/secureStore.d.ts.map +1 -0
  126. package/lib/typescript/module/access/accessTier.d.ts +14 -0
  127. package/lib/typescript/module/access/accessTier.d.ts.map +1 -0
  128. package/lib/typescript/module/app-auth.d.ts +7 -0
  129. package/lib/typescript/module/app-auth.d.ts.map +1 -0
  130. package/lib/typescript/module/config/types.d.ts +171 -0
  131. package/lib/typescript/module/config/types.d.ts.map +1 -0
  132. package/lib/typescript/module/config/validateConfig.d.ts +8 -0
  133. package/lib/typescript/module/config/validateConfig.d.ts.map +1 -0
  134. package/lib/typescript/module/core/authMachine.d.ts +14 -0
  135. package/lib/typescript/module/core/authMachine.d.ts.map +1 -0
  136. package/lib/typescript/module/core/profile.d.ts +15 -0
  137. package/lib/typescript/module/core/profile.d.ts.map +1 -0
  138. package/lib/typescript/module/core/session.d.ts +60 -0
  139. package/lib/typescript/module/core/session.d.ts.map +1 -0
  140. package/lib/typescript/module/diagnostics/errors.d.ts +37 -0
  141. package/lib/typescript/module/diagnostics/errors.d.ts.map +1 -0
  142. package/lib/typescript/module/diagnostics/messageKeys.d.ts +57 -0
  143. package/lib/typescript/module/diagnostics/messageKeys.d.ts.map +1 -0
  144. package/lib/typescript/module/index.d.ts +27 -0
  145. package/lib/typescript/module/index.d.ts.map +1 -0
  146. package/lib/typescript/module/keychain.d.ts +7 -0
  147. package/lib/typescript/module/keychain.d.ts.map +1 -0
  148. package/lib/typescript/module/oidc/authClient.d.ts +75 -0
  149. package/lib/typescript/module/oidc/authClient.d.ts.map +1 -0
  150. package/lib/typescript/module/oidc/classifyError.d.ts +28 -0
  151. package/lib/typescript/module/oidc/classifyError.d.ts.map +1 -0
  152. package/lib/typescript/module/oidc/socialRouting.d.ts +22 -0
  153. package/lib/typescript/module/oidc/socialRouting.d.ts.map +1 -0
  154. package/lib/typescript/module/package.json +1 -0
  155. package/lib/typescript/module/react/AuthProvider.d.ts +17 -0
  156. package/lib/typescript/module/react/AuthProvider.d.ts.map +1 -0
  157. package/lib/typescript/module/react/hooks.d.ts +42 -0
  158. package/lib/typescript/module/react/hooks.d.ts.map +1 -0
  159. package/lib/typescript/module/testing/conformance.d.ts +32 -0
  160. package/lib/typescript/module/testing/conformance.d.ts.map +1 -0
  161. package/lib/typescript/module/testing/index.d.ts +11 -0
  162. package/lib/typescript/module/testing/index.d.ts.map +1 -0
  163. package/lib/typescript/module/tokens/accessToken.d.ts +45 -0
  164. package/lib/typescript/module/tokens/accessToken.d.ts.map +1 -0
  165. package/lib/typescript/module/tokens/secureStore.d.ts +26 -0
  166. package/lib/typescript/module/tokens/secureStore.d.ts.map +1 -0
  167. package/package.json +68 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,116 @@
1
1
  # @chipmobilesdk/rn-auth
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Every peer range has an upper bound, and no package declares a peer it does not use. ([#21](https://github.com/operationd8979/chip-mobile-sdk/pull/21))
8
+
9
+ A peer range is now a caret, a tilde or an explicit `<`, except for `react` and
10
+ `react-native`: an app brings exactly one of each, so a floor is the only useful thing
11
+ to say about them. Every other peer is a library the app installs beside us, and an
12
+ open `>=` was a promise about versions nobody had run — mmkv 3→4 lost entitlements and
13
+ pending purchases exactly that way.
14
+
15
+ **Four of the new ceilings exclude a version that is already published**, so an app
16
+ that took the open range at its word may now see a peer warning. The new bound is the
17
+ major this release is tested against, which is the thing the old range failed to say:
18
+
19
+ | Peer | Was | Now | Published above the ceiling |
20
+ |---|---|---|---|
21
+ | `react-native-app-auth` (rn-auth) | `>=8` | `^8.0.0` | 9.0.0 |
22
+ | `react-native-keychain` (rn-auth) | `>=10` | `^10.0.0` | 11.0.0 |
23
+ | `@op-engineering/op-sqlite` (rn-local-db) | `>=17.1.0` | `^17.1.0` | 18.x, 19.x |
24
+ | `@react-native-firebase/messaging` (rn-notification) | `>=26.0.0` | `^26.0.0` | 27.x |
25
+
26
+ The others — `react-native-vision-camera` `^5.1.1`, `react-native-svg` `^15.15.0`,
27
+ `react-native-unistyles` `^3.2.0`, `@dr.pogodin/react-native-fs` `^2.39.2`,
28
+ `react-native-quick-crypto` `^1.0.0`, `react-native-notify-kit` `^10.5.0`,
29
+ `react-native-localize` `^3.7.0`, `react-native-mmkv` `^4.0.0` — exclude nothing that
30
+ exists today. rn-payment's mmkv range was already bounded (`>=4.0.0 <5`) and is now
31
+ written as the caret that means the same thing.
32
+
33
+ Peers nothing imports are gone. `rn-theme`, `rn-local-db` and `rn-notification` asked
34
+ for `react` without having a component or a hook between them; `rn-auth`, `rn-ai` and
35
+ `rn-i18n` asked for `react-native` without touching a React Native API (rn-auth reaches
36
+ both native modules through `lazyPeer`, rn-i18n formats on `Intl`); `rn-notification`
37
+ asked for `@react-native-firebase/app`, which messaging declares itself. `rn-ai` no
38
+ longer peers on `@chipmobilesdk/rn-auth` at all — it asks for a `TokenProvider`, a
39
+ two-method interface rn-auth's `auth` satisfies, so an app with its own token source
40
+ installs nothing extra. An app that enables push or signs in through rn-auth installs
41
+ the same packages as before; it is the manifest that stopped overstating.
42
+
43
+ `react-native-localize` is declared optional, which is what the code already did: the
44
+ time-zone reader goes through `lazyPeer` and falls back to `Intl` without it. The
45
+ `peerDependenciesMeta` entries that said `optional: false` are gone — that is npm's
46
+ default, and writing it down only invited the question of which peers were undecided.
47
+
48
+ `npm run check:manifests` now fails on an unbounded peer range, a peer nothing in
49
+ `src/` imports, and a `peerDependenciesMeta` entry for either, so the policy holds
50
+ without anyone remembering it.
51
+
52
+ - Every package now ships built JavaScript with declaration files, instead of asking the
53
+ app to compile its TypeScript. ([#22](https://github.com/operationd8979/chip-mobile-sdk/pull/22))
54
+
55
+ Each tarball carries `lib/commonjs`, `lib/module` and `lib/typescript` (built with
56
+ `react-native-builder-bob`), and `src/` alongside them. What that changes for a
57
+ consumer:
58
+
59
+ - **Nothing to add to `transformIgnorePatterns`.** `require` resolves to the CommonJS
60
+ build, so an app's Jest loads this package without being told to transform it. That
61
+ was the one thing every consuming app had to know about us (DEP-04).
62
+ - **Typechecking reads our `.d.ts`** rather than compiling our source under our
63
+ `tsconfig`. A consumer's stricter — or looser — settings no longer meet our code.
64
+ - **`import` resolves to ESM**, so a bundler can tree-shake what it does not use.
65
+
66
+ No exported name changed, and no subpath moved: `.`, `./testing`, `./push`,
67
+ `./advanced`, `./app-auth`, `./keychain` and rn-core's twelve subpaths resolve exactly
68
+ as before, each now with its own declarations for both module systems. publint and
69
+ `attw --profile node16` pass on all twelve packages, which they could not before.
70
+
71
+ Inside the monorepo nothing changed either, and that is deliberate: every subpath also
72
+ declares a private `chipmobilesdk-source` condition pointing at its TypeScript, and
73
+ Metro, Jest and `tsc` here ask for that condition first. The demo app bundles 371
74
+ modules straight from `packages/*/src`, so editing a package still changes the app with
75
+ no build step, and coverage is still measured on the source. The condition is named for
76
+ this organization rather than using the conventional `source` because third-party
77
+ packages declare that one too — `@dr.pogodin/react-native-fs` does — and asking for it
78
+ pulled their sources into our stricter compile.
79
+
80
+ `npm run build:packages` builds everything, `prepack` rebuilds before any `npm pack`,
81
+ and `lib/` is git-ignored: the published bytes are produced by the release, never
82
+ committed. `npm run check:manifests` now fails a package whose `main`, `module`,
83
+ `types`, `source` condition, `files`, build script or `prepack` do not match this shape.
84
+
85
+ ### Patch Changes
86
+
87
+ - Each package's public API and its weight are now recorded in the repository, so a change
88
+ to either is reviewed rather than discovered. ([#23](https://github.com/operationd8979/chip-mobile-sdk/pull/23))
89
+
90
+ `packages/<pkg>/etc/*.api.md` is an api-extractor report per entrypoint — twenty-seven
91
+ of them, generated from the declarations the package publishes and committed. A renamed
92
+ type, a widened union, one more optional field: all of it shows up in a pull request's
93
+ diff. `npm run check:api` fails when a report is out of date and `npm run api:update`
94
+ rewrites them.
95
+
96
+ A report that moves now needs a **minor or major** changeset for that package.
97
+ `check:changesets` enforces it, because the report is generated from what the package
98
+ publishes, and a patch release that moves the public surface is how a consumer's build
99
+ breaks on `npm update`. A report added for the first time is a baseline, not a change.
100
+ `./testing` deliberately has no report: test doubles are not a surface a release is
101
+ gated on.
102
+
103
+ `npm run check:size` holds every entrypoint to a budget in `.size-limit.json`, measured
104
+ on the ESM build with peers and rn-core treated as external — they are what an app
105
+ installs beside us, not our weight. Each budget started at today's measurement plus five
106
+ per cent, so growth becomes a decision someone makes instead of a drift nobody sees. The
107
+ current figures run from 500 B (`rn-core/lazy`) to 19 kB (rn-notification).
108
+
109
+ No behaviour or API changed in this release; the entry is here so the changelog records
110
+ when the reports and the budgets began.
111
+ - Updated dependencies ([#22](https://github.com/operationd8979/chip-mobile-sdk/pull/22), [#23](https://github.com/operationd8979/chip-mobile-sdk/pull/23)):
112
+ - @chipmobilesdk/rn-core@0.2.0
113
+
3
114
  ## 0.5.0
4
115
 
5
116
  ### Minor Changes
package/README.md CHANGED
@@ -30,9 +30,12 @@ npm install @chipmobilesdk/rn-auth react-native-app-auth react-native-keychain
30
30
  cd ios && pod install
31
31
  ```
32
32
 
33
- `react`, `react-native`, `react-native-app-auth`, and `react-native-keychain`
34
- are **peer dependencies**. The two native libraries are only required by the
35
- default adapters — an app injecting custom ports may omit them.
33
+ `react`, `react-native-app-auth` (`^8.0.0`) and `react-native-keychain`
34
+ (`^10.0.0`) are the **peer dependencies**. The two native libraries are only
35
+ required by the default adapters — an app injecting custom ports may omit them,
36
+ and they are declared optional for that reason. There is no `react-native` peer:
37
+ the controller is plain TypeScript, and both native modules are reached through
38
+ `lazyPeer`.
36
39
 
37
40
  See [native setup](../../specs/003-mobile-entra-auth/contracts/native-setup.md)
38
41
  for the iOS `Info.plist` URL scheme and the Android `appAuthRedirectScheme`
@@ -259,8 +262,8 @@ adapters; run them against a store or client you inject.
259
262
 
260
263
  ## Compatibility and validation
261
264
 
262
- React ≥19 · React Native ≥0.85 · `react-native-app-auth` ≥8 ·
263
- `react-native-keychain` ≥10 · iOS + Android · Node ≥22.11 for tooling.
265
+ React ≥19 · React Native ≥0.85 · `react-native-app-auth` `^8.0.0` ·
266
+ `react-native-keychain` `^10.0.0` · iOS + Android · Node ≥22.11 for tooling.
264
267
 
265
268
  The demo integration lives in `src/screens/AuthDemoScreen.tsx`. Run from the
266
269
  repository root:
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.evaluateAccessTier = evaluateAccessTier;
7
+ exports.failClosedTier = failClosedTier;
8
+ /**
9
+ * Access-tier evaluation (FR-010/FR-011/FR-019/FR-020, R6).
10
+ *
11
+ * Pure function over the authenticated token's claims and the app-specific
12
+ * mapping. Object ids are authoritative; display names never grant access.
13
+ * Missing, stale, ambiguous, or group-overage claims fail closed (premium
14
+ * denied, verification = 'unverified').
15
+ */
16
+
17
+ /** The fail-closed default: free + unverified. */
18
+ function failClosedTier() {
19
+ return {
20
+ tier: 'free',
21
+ source: 'default',
22
+ verification: 'unverified'
23
+ };
24
+ }
25
+ function toStringArray(value) {
26
+ if (Array.isArray(value)) {
27
+ return value.filter(entry => typeof entry === 'string');
28
+ }
29
+ if (typeof value === 'string') {
30
+ return [value];
31
+ }
32
+ return [];
33
+ }
34
+
35
+ /**
36
+ * Entra emits a groups overage indicator (`_claim_names.groups` or `hasgroups`)
37
+ * instead of inline groups when the list is too large. Reading the full list
38
+ * would require Graph (out of scope, FR-012), so overage fails closed.
39
+ */
40
+ function hasGroupOverage(claims) {
41
+ if (claims.hasgroups === true) {
42
+ return true;
43
+ }
44
+ const claimNames = claims._claim_names;
45
+ if (claimNames && typeof claimNames === 'object' && 'groups' in claimNames) {
46
+ return true;
47
+ }
48
+ return false;
49
+ }
50
+ function matchesClaim(claims, matcher) {
51
+ const value = claims[matcher.claim];
52
+ if (Array.isArray(value)) {
53
+ return value.includes(matcher.equals);
54
+ }
55
+ return value === matcher.equals;
56
+ }
57
+
58
+ /** Evaluate the access tier, failing closed when entitlement is unverifiable. */
59
+ function evaluateAccessTier(claims, mapping, now = Date.now()) {
60
+ // Object ids first (authoritative). Display names are never consulted.
61
+ const groups = toStringArray(claims.groups);
62
+ if (mapping.premiumGroupObjectIds.length > 0 && groups.some(group => mapping.premiumGroupObjectIds.includes(group))) {
63
+ return {
64
+ tier: 'premium',
65
+ source: 'group',
66
+ verification: 'verified',
67
+ lastRefreshAt: now
68
+ };
69
+ }
70
+
71
+ // Roles next.
72
+ const roles = toStringArray(claims.roles);
73
+ if (mapping.premiumRoleNames?.length && roles.some(role => mapping.premiumRoleNames.includes(role))) {
74
+ return {
75
+ tier: 'premium',
76
+ source: 'role',
77
+ verification: 'verified',
78
+ lastRefreshAt: now
79
+ };
80
+ }
81
+
82
+ // Custom claim matchers last.
83
+ if (mapping.premiumClaimMatchers?.some(matcher => matchesClaim(claims, matcher))) {
84
+ return {
85
+ tier: 'premium',
86
+ source: 'claim',
87
+ verification: 'verified',
88
+ lastRefreshAt: now
89
+ };
90
+ }
91
+
92
+ // No premium indicator matched. If group claims are unavailable due to
93
+ // overage and premium depends on groups, we cannot verify → fail closed.
94
+ if (mapping.premiumGroupObjectIds.length > 0 && hasGroupOverage(claims)) {
95
+ return {
96
+ tier: 'free',
97
+ source: 'default',
98
+ verification: 'unverified',
99
+ lastRefreshAt: now
100
+ };
101
+ }
102
+
103
+ // Verified free: claims were present and simply did not grant premium.
104
+ return {
105
+ tier: 'free',
106
+ source: 'default',
107
+ verification: 'verified',
108
+ lastRefreshAt: now
109
+ };
110
+ }
111
+ //# sourceMappingURL=accessTier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["failClosedTier","tier","source","verification","toStringArray","value","Array","isArray","filter","entry","hasGroupOverage","claims","hasgroups","claimNames","_claim_names","matchesClaim","matcher","claim","includes","equals","evaluateAccessTier","mapping","now","Date","groups","premiumGroupObjectIds","length","some","group","lastRefreshAt","roles","premiumRoleNames","role","premiumClaimMatchers"],"sourceRoot":"../../../src","sources":["access/accessTier.ts"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACO,SAASA,cAAcA,CAAA,EAAe;EAC5C,OAAO;IAAEC,IAAI,EAAE,MAAM;IAAEC,MAAM,EAAE,SAAS;IAAEC,YAAY,EAAE;EAAa,CAAC;AACvE;AAEA,SAASC,aAAaA,CAACC,KAAc,EAAY;EAChD,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;IACzB,OAAOA,KAAK,CAACG,MAAM,CAAEC,KAAK,IAAsB,OAAOA,KAAK,KAAK,QAAQ,CAAC;EAC3E;EACA,IAAI,OAAOJ,KAAK,KAAK,QAAQ,EAAE;IAC9B,OAAO,CAACA,KAAK,CAAC;EACf;EACA,OAAO,EAAE;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASK,eAAeA,CAACC,MAA+B,EAAW;EAClE,IAAIA,MAAM,CAACC,SAAS,KAAK,IAAI,EAAE;IAC9B,O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AAM,EAAE,MAAM;MAAEC,YAAY,EAAE,UAAU;MAAE0B,aAAa,EAAEP;IAAI,CAAC;EACzF;;EAEA;EACA,IAAID,OAAO,CAACY,oBAAoB,EAAEN,IAAI,CAACX,OAAO,IAAID,YAAY,CAACJ,MAAM,EAAEK,OAAO,CAAC,CAAC,EAAE;IACjF,OAAO;MAAEf,IAAI,EAAE,SAAS;MAAEC,MAAM,EAAE,OAAO;MAAEC,YAAY,EAAE,UAAU;MAAE0B,aAAa,EAAEP;IAAI,CAAC;EAC1F;;EAEA;EACA;EACA,IAAID,OAAO,CAACI,qBAAqB,CAACC,MAAM,GAAG,CAAC,IAAIhB,eAAe,CAACC,MAAM,CAAC,EAAE;IACxE,OAAO;MAAEV,IAAI,EAAE,MAAM;MAAEC,MAAM,EAAE,SAAS;MAAEC,YAAY,EAAE,YAAY;MAAE0B,aAAa,EAAEP;IAAI,CAAC;EAC3F;;EAEA;EACA,OAAO;IAAErB,IAAI,EAAE,MAAM;IAAEC,MAAM,EAAE,SAAS;IAAEC,YAAY,EAAE,UAAU;IAAE0B,aAAa,EAAEP;EAAI,CAAC;AACzF","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "createAppAuthClient", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _authClient.createAppAuthClient;
10
+ }
11
+ });
12
+ var _authClient = require("./oidc/authClient.js");
13
+ //# sourceMappingURL=app-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_authClient","require"],"sourceRoot":"../../src","sources":["app-auth.ts"],"mappings":";;;;;;;;;;;AAKA,IAAAA,WAAA,GAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DEVICE_PLATFORMS = void 0;
7
+ /**
8
+ * Public type contracts for @chipmobilesdk/rn-auth. Shapes follow
9
+ * specs/003-mobile-entra-auth/data-model.md.
10
+ */
11
+
12
+ /** The providers this package has copy for out of the box. */
13
+
14
+ /**
15
+ * A provider id. Open on purpose: routing is `domain_hint` and nothing else, so
16
+ * adding an IdP the tenant federates — Microsoft account, an email one-time
17
+ * code — is a change to an app's config, not a release of this package
18
+ * (AUTH-14). `KnownProviderId` keeps the three familiar ones in autocomplete.
19
+ */
20
+
21
+ const DEVICE_PLATFORMS = exports.DEVICE_PLATFORMS = ['ios', 'android'];
22
+
23
+ /** Provider Setup Configuration — non-secret public values only (FR-016/FR-017). */
24
+
25
+ /** One configured protected resource for delegated token requests (FR-007). */
26
+
27
+ /** App-specific mapping from tenant indicators to access tiers (FR-019/FR-020). */
28
+
29
+ /** App-supplied, public-only setup input (FR-015/FR-016/FR-017). */
30
+
31
+ /** Advanced/testing options. `platform` overrides the detected device platform. */
32
+
33
+ /** Customer User / app-visible profile (FR-006). */
34
+
35
+ /** Access Tier — local interpretation of tenant indicators (FR-010). */
36
+
37
+ /** Access Token Request result (FR-007). */
38
+
39
+ /** Single active app-visible authenticated state (FR-005/FR-022). */
40
+
41
+ /** Result of a premium-only gate check (US3). */
42
+
43
+ /**
44
+ * What `signOutGlobal` did beyond the device (added in 0.2.2). Local state is
45
+ * cleared either way; `failed` means the tenant session may still be alive, so
46
+ * the next interactive sign-in can complete without a password prompt.
47
+ */
48
+
49
+ /** The auth controller returned by `createAuth` (single active account). */
50
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEVICE_PLATFORMS","exports"],"sourceRoot":"../../../src","sources":["config/types.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAQA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,gBAA2C,GAAAC,OAAA,CAAAD,gBAAA,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC;;AAE7E;;AAoBA;;AAYA;;AAUA;;AAmBA;;AAiBA;;AAoBA;;AAUA;;AASA;;AASA;;AAMA;AACA;AACA;AACA;AACA;;AAOA","ignoreList":[]}
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.validateConfig = validateConfig;
7
+ var _types = require("./types.js");
8
+ var _errors = require("../diagnostics/errors.js");
9
+ /**
10
+ * Deterministic configuration validation (FR-005 → configuration-error).
11
+ * Throws AuthConfigError before any provider flow can start (US4 scenario 2).
12
+ * Covers the auth-config.md Section A–F rules.
13
+ */
14
+
15
+ function hasScheme(url) {
16
+ return /^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(url);
17
+ }
18
+
19
+ /** https, or http on a development machine. */
20
+ function isSecureAuthority(url) {
21
+ if (/^https:/i.test(url)) {
22
+ return true;
23
+ }
24
+ return /^http:\/\/(localhost|127\.0\.0\.1|\[::1\])(:\d+)?(\/|$)/i.test(url);
25
+ }
26
+ function validateConfig(config) {
27
+ // Section A — tenant/client settings
28
+ if (!config.authority || !config.authority.trim()) {
29
+ throw new _errors.AuthConfigError('auth.error.configuration', 'Missing "authority"');
30
+ }
31
+ if (!hasScheme(config.authority)) {
32
+ throw new _errors.AuthConfigError('auth.error.configuration', '"authority" must be an absolute URL');
33
+ }
34
+ // Tokens travel over this. A tenant reachable over plaintext http is a
35
+ // configuration mistake, not a deployment choice — except on a dev machine.
36
+ if (!isSecureAuthority(config.authority)) {
37
+ throw new _errors.AuthConfigError('auth.error.configuration', '"authority" must use https (http is accepted only for localhost)');
38
+ }
39
+ if (!config.clientId || !config.clientId.trim()) {
40
+ throw new _errors.AuthConfigError('auth.error.configuration', 'Missing "clientId"');
41
+ }
42
+ if (!config.redirectUrl || !config.redirectUrl.trim()) {
43
+ throw new _errors.AuthConfigError('auth.error.configuration', 'Missing "redirectUrl"');
44
+ }
45
+ if (!hasScheme(config.redirectUrl)) {
46
+ throw new _errors.AuthConfigError('auth.error.redirectMismatch', '"redirectUrl" must include a scheme matching the native redirect configuration');
47
+ }
48
+ if (!Array.isArray(config.scopes) || config.scopes.length === 0) {
49
+ throw new _errors.AuthConfigError('auth.error.configuration', 'At least one OIDC scope is required');
50
+ }
51
+ if (!config.scopes.includes('offline_access')) {
52
+ throw new _errors.AuthConfigError('auth.error.configuration', '"offline_access" scope is required for session restore and silent refresh');
53
+ }
54
+
55
+ // Sections B/C — providers
56
+ if (!Array.isArray(config.providers) || config.providers.length === 0) {
57
+ throw new _errors.AuthConfigError('auth.error.configuration', 'At least one provider must be configured');
58
+ }
59
+ const providerIds = new Set();
60
+ for (const provider of config.providers) {
61
+ if (providerIds.has(provider.id)) {
62
+ throw new _errors.AuthConfigError('auth.error.configuration', `Duplicate provider "${provider.id}"`);
63
+ }
64
+ providerIds.add(provider.id);
65
+ if (!provider.domainHint || !provider.domainHint.trim()) {
66
+ throw new _errors.AuthConfigError('auth.error.configuration', `Provider "${provider.id}" is missing a domainHint`);
67
+ }
68
+ if (!Array.isArray(provider.platforms) || provider.platforms.length === 0) {
69
+ throw new _errors.AuthConfigError('auth.error.configuration', `Provider "${provider.id}" must declare at least one platform`);
70
+ }
71
+ for (const platform of provider.platforms) {
72
+ if (!_types.DEVICE_PLATFORMS.includes(platform)) {
73
+ // A typo here hides the provider on every device rather than failing.
74
+ throw new _errors.AuthConfigError('auth.error.configuration', `Provider "${provider.id}" declares unknown platform "${String(platform)}"`);
75
+ }
76
+ }
77
+ if (typeof provider.labelKey !== 'string' || !provider.labelKey.trim()) {
78
+ throw new _errors.AuthConfigError('auth.error.configuration', `Provider "${provider.id}" is missing a labelKey`);
79
+ }
80
+ }
81
+
82
+ // Section D — resources
83
+ if (config.resources) {
84
+ const resourceKeys = new Set();
85
+ for (const resource of config.resources) {
86
+ if (!resource.key || !resource.key.trim()) {
87
+ throw new _errors.AuthConfigError('auth.error.configuration', 'A resource is missing "key"');
88
+ }
89
+ if (resourceKeys.has(resource.key)) {
90
+ throw new _errors.AuthConfigError('auth.error.configuration', `Duplicate resource "${resource.key}"`);
91
+ }
92
+ resourceKeys.add(resource.key);
93
+ if (!Array.isArray(resource.scopes) || resource.scopes.length === 0) {
94
+ throw new _errors.AuthConfigError('auth.error.configuration', `Resource "${resource.key}" must declare at least one scope`);
95
+ }
96
+ }
97
+ }
98
+
99
+ // Section E — access-tier mapping
100
+ const mapping = config.accessTierMapping;
101
+ if (!mapping) {
102
+ throw new _errors.AuthConfigError('auth.error.configuration', 'Missing "accessTierMapping"');
103
+ }
104
+ const hasPremiumIndicator = (mapping.premiumGroupObjectIds?.length ?? 0) > 0 || (mapping.premiumRoleNames?.length ?? 0) > 0 || (mapping.premiumClaimMatchers?.length ?? 0) > 0;
105
+ if (!hasPremiumIndicator) {
106
+ throw new _errors.AuthConfigError('auth.error.configuration', 'accessTierMapping must define at least one premium group object id, role name, or claim matcher');
107
+ }
108
+
109
+ // Section F — injected ports
110
+ if (!config.secureStore) {
111
+ throw new _errors.AuthConfigError('auth.error.configuration', 'A secureStore is required (FR-021)');
112
+ }
113
+ }
114
+ //# sourceMappingURL=validateConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_types","require","_errors","hasScheme","url","test","isSecureAuthority","validateConfig","config","authority","trim","AuthConfigError","clientId","redirectUrl","Array","isArray","scopes","length","includes","providers","providerIds","Set","provider","has","id","add","domainHint","platforms","platform","DEVICE_PLATFORMS","String","labelKey","resources","resourceKeys","resource","key","mapping","accessTierMapping","hasPremiumIndicator","premiumGroupObjectIds","premiumRoleNames","premiumClaimMatchers","secureStore"],"sourceRoot":"../../../src","sources":["config/validateConfig.ts"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAPA;AACA;AACA;AACA;AACA;;AAKA,SAASE,SAASA,CAACC,GAAW,EAAW;EACxC,OAAO,2BAA2B,CAACC,IAAI,CAACD,GAAG,CAAC;AAC7C;;AAEA;AACA,SAASE,iBAAiBA,CAACF,GAAW,EAAW;EAChD,IAAI,UAAU,CA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