@schibsted/account-sdk-browser 5.2.6 → 5.2.7

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
@@ -1,6 +1,4 @@
1
- [![logo](https://www.schibsted.com/Global/LogoTypes/Logos%202014/SMG_Small_2014_RGB.png)](https://github.com/schibsted/account-sdk-browser)
2
-
3
- ![Build Status](https://github.com/schibsted/account-sdk-browser/actions/workflows/pr.yml/badge.svg)
1
+ ![Build Status](https://schibsted.ghe.com/user-identity/account-sdk-browser/actions/workflows/pr.yml/badge.svg)
4
2
  [![Code coverage](https://codecov.io/gh/schibsted/account-sdk-browser/branch/master/graph/badge.svg)](https://codecov.io/gh/schibsted/account-sdk-browser)
5
3
  [![Snyk](https://snyk.io/test/github/schibsted/account-sdk-browser/badge.svg?targetFile=package.json)](https://snyk.io/test/github/schibsted/account-sdk-browser)
6
4
 
@@ -53,9 +51,9 @@ Follow the [migration guide](./MIGRATION.md).
53
51
  ## Example project
54
52
 
55
53
  There is an example that demonstrates how the SDK can be used. The code is
56
- [here](https://github.com/schibsted/sdk-example), and you can see it live
54
+ [here](https://schibsted.ghe.com/user-identity/sdk-example), and you can see it live
57
55
  [here](https://pro.sdk-example.com). You have a use-case that we haven't thought of? Ask us to add
58
- it by creating an [issue](https://github.com/schibsted/sdk-example/issues/new).
56
+ it by creating an [issue](https://schibsted.ghe.com/user-identity/sdk-example/issues/new).
59
57
 
60
58
  You can use that code as inspiration or just fork and play with it. The account-sdk-browser NPM
61
59
  module is used for authenticating the user with Schibsted account. Take a look at how the SDK is
@@ -184,7 +182,7 @@ signal to your main page — using
184
182
  [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) or something
185
183
  similar — to indicate that the user is logged in. If the popup window fails to open, it'll
186
184
  automatically fall back to the redirect flow. The SDK Example project mentioned above demonstrates
187
- how it can work. Again, you can see [sdk-example](https://github.com/schibsted/sdk-example) if you
185
+ how it can work. Again, you can see [sdk-example](https://schibsted.ghe.com/user-identity/sdk-example) if you
188
186
  want a working example.
189
187
 
190
188
  #### Is the user logged in?
@@ -312,23 +310,24 @@ browser side. Nevertheless, here is a short description of them.
312
310
  * `referer` (yep, missing the double "rr"..): If this is missing, a call to hassession will
313
311
  return a `401` with a `UserException` that says `No session found`.
314
312
 
315
- ## Releasing
313
+ ## Publishing
316
314
 
317
- Tags are pushed to NPM via Travis. To release a new version, run in master
315
+ Versioning and changelog are handled by [Release Please (GitHub Action)](https://github.com/googleapis/release-please). Publishing to [npmjs.org](https://www.npmjs.com/package/@schibsted/account-sdk-browser) is handled by the [npm-publish workflow](./.github/workflows/npm-publish.yml). See the [Release Please workflow](./.github/workflows/release-please.yml) and [`release-please-config.json`](./release-please-config.json).
318
316
 
319
- ```bash
320
- $ npm version <major|minor|patch>
321
- ```
317
+ When publishable changes have been merged to `master`, Release Please will create (or update) a release pull request.
318
+ The suggested version is based on the commit messages in accordance with the [Conventional Commits](https://www.conventionalcommits.org/) specification — `fix:` bumps the patch version, `feat:` bumps the minor version, and `feat!:` or a `BREAKING CHANGE:` footer bumps the major version.
319
+ Other prefixes (`chore:`, `docs:`, `test:`, `refactor:`, `ci:`, `build:`, `style:`) do not trigger a release and are hidden from the changelog.
320
+
321
+ To release/publish the changes simply merge the corresponding pull request and wait for the publish workflow to finish.
322
+ Release-please will create a git tag (e.g. `v5.2.7`) and a GitHub Release, and the [publish workflow](./.github/workflows/npm-publish.yml) will push the package to npmjs.org.
322
323
 
323
- which will run the test, update version in package.json, commit, tag the commit
324
- and push.
325
324
 
326
325
  ## LICENSE
327
326
 
328
327
  Copyright (c) 2026 Schibsted Products & Technology AS
329
328
 
330
329
  Licensed under the [MIT
331
- License](https://github.com/schibsted/account-sdk-browser/blob/master/LICENSE.md)
330
+ License](https://schibsted.ghe.com/user-identity/account-sdk-browser/blob/master/LICENSE.md)
332
331
 
333
332
  Unless required by applicable law or agreed to in writing, software distributed under the License is
334
333
  distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
package/es5/global.js CHANGED
@@ -2490,6 +2490,11 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2490
2490
  _this2.sessionStorageCache.set(HAS_SESSION_CACHE_KEY, {
2491
2491
  error: _context.t0
2492
2492
  }, expiresIn);
2493
+ } else if (_context.t0 && _context.t0.code >= 500 && _context.t0.code < 600 && _this2._enableSessionCaching) {
2494
+ // Temporary fix: 30 seconds cache to limit number of calls when service is unavailable
2495
+ _this2.sessionStorageCache.set(HAS_SESSION_CACHE_KEY, {
2496
+ error: _context.t0
2497
+ }, 30 * 1000);
2493
2498
  }
2494
2499
  throw _context.t0;
2495
2500
  case 15:
@@ -12199,11 +12204,11 @@ function emulate(global) {
12199
12204
 
12200
12205
  "use strict";
12201
12206
  __webpack_require__.r(__webpack_exports__);
12202
- // Automatically generated in 'npm version' by scripts/genversion.js
12207
+ // Version is bumped automatically by release-please. See release-please-config.json.
12203
12208
 
12204
12209
 
12205
12210
 
12206
- var version = '5.2.6';
12211
+ var version = '5.2.7'; // x-release-please-version
12207
12212
  /* harmony default export */ __webpack_exports__["default"] = (version);
12208
12213
 
12209
12214
  /***/ }),
@@ -12863,7 +12868,7 @@ var Payment = /*#__PURE__*/function () {
12863
12868
  }
12864
12869
 
12865
12870
  /**
12866
- * @deprecated https://github.com/schibsted/account-sdk-browser/issues/94
12871
+ * @deprecated https://schibsted.ghe.com/user-identity/account-sdk-browser/issues/94
12867
12872
  *
12868
12873
  * Get the url for the paylink purchase
12869
12874
  * @todo Check working-ness for BFF + SPiD