@amedia/user 1.9.0 → 1.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @amedia/user
2
2
 
3
+ ## 1.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+ with a network error. The browser gives this error when the connection stops or
9
+ the reader leaves the page. `getCurrentAccess` still rejects, so callers do not
10
+ change.
11
+
12
+ - [#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.
13
+ A CMP that blocks unknown localStorage keys logged each aID request on sites
14
+ without the app, because the blocked write of `amedia-user:bm-app-login` left
15
+ the key empty and the next response tried again.
16
+ - An aID response without the `X-Aid-BM-App` header now sets the state in
17
+ memory for the page. The library does not write `false` to localStorage.
18
+ - A response with the header still writes the flag, and the page also keeps
19
+ the state in memory. A blocked write no longer stops the app login.
20
+ - Only aID responses set the state. A response from another service, for
21
+ example Shamo, does not mark the app login as disabled.
22
+ - `goToLoginPage` writes `amedia-user:can-start-bm-app-login-poller` only when
23
+ `window.BM` is present.
24
+
25
+ - [#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
26
+ cookie that stops a reload loop. It rejects with
27
+ `PaywallError.ERROR_RELOADED_NO_ACCESS` instead, as it does when the loop guard
28
+ trips. The cookie is renamed to `aid.paywall-reload-performed` so that the
29
+ cookie whitelist on Amedia sites keeps it.
30
+
3
31
  ## 1.9.0
4
32
 
5
33
  ### 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.1",
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {