@baukit/auth-web 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +12 -0
  2. package/package.json +6 -5
package/README.md CHANGED
@@ -27,3 +27,15 @@ Pass a unique `storageKeyPrefix` when more than one client for the same issuer/c
27
27
  Terminal refresh rejection (`invalid_grant`, `invalid_token`, or HTTP 400/401) clears tokens, emits `subscribeSessionExpired()`, and resolves to `undefined`. Transient network/provider failures preserve the session and reject with a sanitized `OidcError` whose `retryable` property is `true`.
28
28
 
29
29
  Display `safeAuthErrorMessage(error)` at the UI boundary. It returns only library-owned allowlisted messages and never provider descriptions, response bodies, authorization codes, or token content.
30
+
31
+ ## Boundaries
32
+
33
+ The package handles the OIDC authorization-code flow and the tokens it produces. It renders no UI,
34
+ depends on no framework or router, and makes no authorization decision: what a signed-in user is
35
+ allowed to do is the product's question, and the server's.
36
+
37
+ Token storage uses browser storage under `storageKeyPrefix`. That is a deliberate tradeoff rather
38
+ than an oversight, and it is why `safeAuthErrorMessage` exists: provider bodies, authorization
39
+ codes, and token contents never reach a message the UI can render or a logger can capture.
40
+
41
+ `@baukit/auth-native` is the same contract for React Native and Expo.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baukit/auth-web",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Framework-neutral browser OIDC authorization-code client with S256 PKCE, provider discovery, and callback deduplication.",
5
5
  "license": "MIT",
6
6
  "author": "Patrick Koss",
@@ -32,13 +32,14 @@
32
32
  "README.md",
33
33
  "LICENSE"
34
34
  ],
35
- "devDependencies": {
36
- "typescript": "6.0.3"
37
- },
38
35
  "scripts": {
39
36
  "build": "tsc -p tsconfig.json",
37
+ "prepare": "pnpm run build",
40
38
  "test": "vitest run --config ../../vitest.config.ts",
41
39
  "lint": "eslint src --max-warnings=0",
42
40
  "format:check": "prettier --check src package.json tsconfig.json"
41
+ },
42
+ "devDependencies": {
43
+ "typescript": "6.0.3"
43
44
  }
44
- }
45
+ }