@schibsted/account-sdk-browser 4.7.0 → 4.7.3
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 +1 -1
- package/es5/global.js +13 -5
- 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 +13 -5
- 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 +13 -5
- 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 +10 -2
- package/es5/monetization.js.map +1 -1
- package/es5/monetization.min.js +1 -1
- package/es5/monetization.min.js.map +1 -1
- package/package.json +1 -1
- package/src/cache.js +9 -1
- package/src/identity.js +3 -3
- package/CHANGELOG.md +0 -532
- package/NOTICE +0 -19
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[](https://github.com/schibsted/account-sdk-browser)
|
|
2
2
|
|
|
3
|
-
[](https://travis-ci.com/schibsted/account-sdk-browser)
|
|
3
|
+
[](https://app.travis-ci.com/schibsted/account-sdk-browser)
|
|
4
4
|
[](https://codecov.io/gh/schibsted/account-sdk-browser)
|
|
5
5
|
[](https://snyk.io/test/github/schibsted/account-sdk-browser)
|
|
6
6
|
|
package/es5/global.js
CHANGED
|
@@ -3082,7 +3082,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
3082
3082
|
}
|
|
3083
3083
|
|
|
3084
3084
|
var isValidAcrValue = function isValidAcrValue(acrValue) {
|
|
3085
|
-
return Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValue, ['password', 'otp', 'sms', 'eid-no', 'eid-se', 'eid'], true);
|
|
3085
|
+
return Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValue, ['password', 'otp', 'sms', 'eid-no', 'eid-se', 'eid-fi', 'eid'], true);
|
|
3086
3086
|
};
|
|
3087
3087
|
|
|
3088
3088
|
Object(_validate__WEBPACK_IMPORTED_MODULE_21__["assert"])(!acrValues || Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValues, ['', 'otp-email'], true) || acrValues.split(' ').every(isValidAcrValue), "The acrValues parameter is not acceptable: ".concat(acrValues));
|
|
@@ -3129,7 +3129,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
3129
3129
|
key: "accountUrl",
|
|
3130
3130
|
value: function accountUrl() {
|
|
3131
3131
|
var redirectUri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.redirectUri;
|
|
3132
|
-
return this._spid.makeUrl('
|
|
3132
|
+
return this._spid.makeUrl('profile-pages', {
|
|
3133
3133
|
response_type: 'code',
|
|
3134
3134
|
redirect_uri: redirectUri
|
|
3135
3135
|
});
|
|
@@ -3144,7 +3144,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
3144
3144
|
key: "phonesUrl",
|
|
3145
3145
|
value: function phonesUrl() {
|
|
3146
3146
|
var redirectUri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.redirectUri;
|
|
3147
|
-
return this._spid.makeUrl('
|
|
3147
|
+
return this._spid.makeUrl('profile-pages/about-you/phone', {
|
|
3148
3148
|
response_type: 'code',
|
|
3149
3149
|
redirect_uri: redirectUri
|
|
3150
3150
|
});
|
|
@@ -10735,9 +10735,17 @@ var Cache = /*#__PURE__*/function () {
|
|
|
10735
10735
|
_createClass(Cache, [{
|
|
10736
10736
|
key: "get",
|
|
10737
10737
|
value: function get(key) {
|
|
10738
|
+
function getObj(raw) {
|
|
10739
|
+
try {
|
|
10740
|
+
return JSON.parse(raw);
|
|
10741
|
+
} catch (e) {
|
|
10742
|
+
return null;
|
|
10743
|
+
}
|
|
10744
|
+
}
|
|
10745
|
+
|
|
10738
10746
|
try {
|
|
10739
10747
|
var raw = this.cache.get(key);
|
|
10740
|
-
var obj =
|
|
10748
|
+
var obj = getObj(raw);
|
|
10741
10749
|
|
|
10742
10750
|
if (obj && Number.isInteger(obj.expiresOn) && obj.expiresOn > Date.now()) {
|
|
10743
10751
|
return obj.value;
|
|
@@ -11551,7 +11559,7 @@ function emulate(global) {
|
|
|
11551
11559
|
/* 175 */
|
|
11552
11560
|
/***/ (function(module) {
|
|
11553
11561
|
|
|
11554
|
-
module.exports = JSON.parse("{\"name\":\"@schibsted/account-sdk-browser\",\"version\":\"4.7.
|
|
11562
|
+
module.exports = JSON.parse("{\"name\":\"@schibsted/account-sdk-browser\",\"version\":\"4.7.3\",\"description\":\"Schibsted account SDK for browsers\",\"main\":\"index.js\",\"scripts\":{\"build\":\"./build.sh\",\"clean\":\"rimraf .cache coverage dist docs\",\"docs\":\"rimraf docs && jsdoc -c ./utils/jsdoc.js --verbose\",\"lint\":\"eslint .\",\"pretest\":\"npm run lint\",\"test\":\"jest\",\"precover\":\"npm run lint\",\"cover\":\"jest --coverage\",\"postcover\":\"codecov\"},\"author\":\"\",\"license\":\"MIT\",\"dependencies\":{\"tiny-emitter\":\"^2.1.0\"},\"devDependencies\":{\"@babel/core\":\"^7.11.4\",\"@babel/preset-env\":\"^7.11.0\",\"babel-loader\":\"^8.1.0\",\"codecov\":\"^3.6.5\",\"core-js\":\"^3.6.5\",\"docdash\":\"git+https://github.com/torarvid/docdash.git#v0.5.0\",\"eslint\":\"^6.8.0\",\"eslint-plugin-import\":\"^2.20.2\",\"jest\":\"^26.4.2\",\"jest-junit\":\"^10.0.0\",\"jsdoc\":\"^3.6.5\",\"node-fetch\":\"^2.6.0\",\"regenerator-runtime\":\"^0.13.7\",\"webpack\":\"^4.44.1\",\"webpack-cli\":\"^3.3.12\",\"whatwg-url\":\"^8.0.0\"},\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/schibsted/account-sdk-browser.git\"},\"babel\":{\"presets\":[[\"@babel/preset-env\",{\"useBuiltIns\":\"usage\",\"corejs\":3,\"targets\":{\"browsers\":[\"> 1%\",\"last 10 chrome major versions\",\"last 10 firefox major versions\",\"last 10 opera major versions\",\"last 2 safari major versions\",\"last 2 ios major versions\",\"last 2 ie major versions\",\"last 5 edge major versions\"]}}]]},\"typings\":\"index.d.ts\"}");
|
|
11555
11563
|
|
|
11556
11564
|
/***/ }),
|
|
11557
11565
|
/* 176 */
|