@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 +13 -14
- package/es5/global.js +8 -3
- package/es5/global.js.map +1 -1
- package/es5/global.min.js +1 -1
- package/es5/global.min.js.map +1 -1
- package/es5/identity.js +7 -2
- package/es5/identity.js.map +1 -1
- package/es5/identity.min.js +1 -1
- package/es5/identity.min.js.map +1 -1
- package/es5/index.js +8 -3
- package/es5/index.js.map +1 -1
- package/es5/index.min.js +1 -1
- package/es5/index.min.js.map +1 -1
- package/es5/monetization.js +2 -2
- package/es5/monetization.js.map +1 -1
- package/es5/monetization.min.js +1 -1
- package/es5/monetization.min.js.map +1 -1
- package/es5/payment.js +1 -1
- package/es5/payment.js.map +1 -1
- package/es5/payment.min.js.map +1 -1
- package/package.json +3 -6
- package/src/identity.js +3 -0
- package/src/payment.d.ts +1 -1
- package/src/payment.js +1 -1
- package/src/version.js +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-

|
|
1
|
+

|
|
4
2
|
[](https://codecov.io/gh/schibsted/account-sdk-browser)
|
|
5
3
|
[](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://
|
|
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://
|
|
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://
|
|
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
|
-
##
|
|
313
|
+
## Publishing
|
|
316
314
|
|
|
317
|
-
|
|
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
|
-
|
|
320
|
-
|
|
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://
|
|
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
|
-
//
|
|
12207
|
+
// Version is bumped automatically by release-please. See release-please-config.json.
|
|
12203
12208
|
|
|
12204
12209
|
|
|
12205
12210
|
|
|
12206
|
-
var version = '5.2.
|
|
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://
|
|
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
|