@amedia/user 1.9.0 → 1.9.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @amedia/user
2
2
 
3
+ ## 1.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1324](https://github.com/amedia/amedia-user-js/pull/1324) [`5717258`](https://github.com/amedia/amedia-user-js/commit/571725877d53f1c343394de3af2b7beb241acc52) Thanks [@hennikul](https://github.com/hennikul)! - Log "Page still marked for another reader after reload" only when the page
8
+ really was reloaded. A guarded URL loaded again some other way, as the apps'
9
+ web views do on refresh and after login, now gets its own reload instead of an
10
+ error. The error also says, without any uuids, whether the reader was logged in
11
+ (`reader`), whether the wrong marks were empty or a uuid (`foreignMarks`), the
12
+ `navigationType`, and `msSinceReload`.
13
+
14
+ ## 1.9.1
15
+
16
+ ### Patch Changes
17
+
18
+ - [#1321](https://github.com/amedia/amedia-user-js/pull/1321) [`327299d`](https://github.com/amedia/amedia-user-js/commit/327299d2efb345950eb7b20289e622657b86fda3) Thanks [@mortenlocka](https://github.com/mortenlocka)! - `getCurrentAccess` does not log an error when the request for access fails
19
+ with a network error. The browser gives this error when the connection stops or
20
+ the reader leaves the page. `getCurrentAccess` still rejects, so callers do not
21
+ change.
22
+
23
+ - [#1319](https://github.com/amedia/amedia-user-js/pull/1319) [`b459d74`](https://github.com/amedia/amedia-user-js/commit/b459d746633d0367babaa4dc7f78cffe28f5d66d) Thanks [@mortenlocka](https://github.com/mortenlocka)! - Write the Berlingske app login keys to localStorage only when they are needed.
24
+ A CMP that blocks unknown localStorage keys logged each aID request on sites
25
+ without the app, because the blocked write of `amedia-user:bm-app-login` left
26
+ the key empty and the next response tried again.
27
+ - An aID response without the `X-Aid-BM-App` header now sets the state in
28
+ memory for the page. The library does not write `false` to localStorage.
29
+ - A response with the header still writes the flag, and the page also keeps
30
+ the state in memory. A blocked write no longer stops the app login.
31
+ - Only aID responses set the state. A response from another service, for
32
+ example Shamo, does not mark the app login as disabled.
33
+ - `goToLoginPage` writes `amedia-user:can-start-bm-app-login-poller` only when
34
+ `window.BM` is present.
35
+
36
+ - [#1323](https://github.com/amedia/amedia-user-js/pull/1323) [`a366398`](https://github.com/amedia/amedia-user-js/commit/a366398d17369738d529bf07af9374d7ef648656) Thanks [@hennikul](https://github.com/hennikul)! - `PaywallUnlockRequest` no longer reloads or redirects when it cannot store the
37
+ cookie that stops a reload loop. It rejects with
38
+ `PaywallError.ERROR_RELOADED_NO_ACCESS` instead, as it does when the loop guard
39
+ trips. The cookie is renamed to `aid.paywall-reload-performed` so that the
40
+ cookie whitelist on Amedia sites keeps it.
41
+
3
42
  ## 1.9.0
4
43
 
5
44
  ### Minor Changes
package/README.md CHANGED
@@ -539,6 +539,13 @@ new PaywallUnlockRequest(['pluss'])
539
539
  PaywallError.ERROR_RELOADED_NO_ACCESS
540
540
  );
541
541
 
542
+ // Same guard, when the browser would not keep the cookie that remembers the
543
+ // reload, so there is nothing to stop a loop. Access was found.
544
+ PaywallError(
545
+ 'Unable to store the reload guard, not reloading.',
546
+ PaywallError.ERROR_RELOADED_NO_ACCESS
547
+ );
548
+
542
549
  // Internal error. Access should have been granted at this time.
543
550
  PaywallError(
544
551
  'New subscription was attached and checked successfully, but internal systems disagree about current site access.',
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "git+https://github.com/amedia/amedia-user-js.git"
7
7
  },
8
8
  "author": "Amedia Produkt og Teknologi AS (https://amedia.no)",
9
- "version": "1.9.0",
9
+ "version": "1.9.2",
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {