@schibsted/account-sdk-browser 4.6.0 → 4.7.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 +9 -0
- package/README.md +1 -7
- package/es5/global.js +11 -9
- 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 +11 -9
- 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 +11 -9
- 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 +1 -1
- package/es5/monetization.min.js +1 -1
- package/package.json +1 -1
- package/src/identity.d.ts +7 -4
- package/src/identity.js +11 -9
package/es5/identity.js
CHANGED
|
@@ -968,8 +968,7 @@ var _require = __webpack_require__(174),
|
|
|
968
968
|
* be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
|
|
969
969
|
* to verify AMR (Authentication Methods References) claim in ID token.
|
|
970
970
|
* Might also be used to ensure additional acr (sms, otp) for already logged in users.
|
|
971
|
-
* Supported
|
|
972
|
-
* one time password using sms.
|
|
971
|
+
* Supported value is also 'otp-email' means one time password using email.
|
|
973
972
|
* @property {string} [scope] - The OAuth scopes for the tokens. This is a list of
|
|
974
973
|
* scopes, separated by space. If the list of scopes contains `openid`, the generated tokens
|
|
975
974
|
* includes the id token which can be useful for getting information about the user. Omitting
|
|
@@ -1004,8 +1003,7 @@ var _require = __webpack_require__(174),
|
|
|
1004
1003
|
* be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
|
|
1005
1004
|
* to verify AMR (Authentication Methods References) claim in ID token.
|
|
1006
1005
|
* Might also be used to ensure additional acr (sms, otp) for already logged in users.
|
|
1007
|
-
* Supported
|
|
1008
|
-
* one time password using sms.
|
|
1006
|
+
* Supported value is also 'otp-email' means one time password using email.
|
|
1009
1007
|
* @property {string} [scope] - The OAuth scopes for the tokens. This is a list of
|
|
1010
1008
|
* scopes, separated by space. If the list of scopes contains `openid`, the generated tokens
|
|
1011
1009
|
* includes the id token which can be useful for getting information about the user. Omitting
|
|
@@ -2085,10 +2083,10 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2085
2083
|
}
|
|
2086
2084
|
|
|
2087
2085
|
var isValidAcrValue = function isValidAcrValue(acrValue) {
|
|
2088
|
-
return Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValue, ['password', 'otp', 'sms', 'eid-no', 'eid-se', 'eid'], true);
|
|
2086
|
+
return Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValue, ['password', 'otp', 'sms', 'eid-no', 'eid-se', 'eid-fi', 'eid'], true);
|
|
2089
2087
|
};
|
|
2090
2088
|
|
|
2091
|
-
Object(_validate__WEBPACK_IMPORTED_MODULE_21__["assert"])(!acrValues || Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValues, ['', 'otp-email'
|
|
2089
|
+
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));
|
|
2092
2090
|
Object(_validate__WEBPACK_IMPORTED_MODULE_21__["assert"])(Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isUrl"])(redirectUri), "loginUrl(): redirectUri must be a valid url but is ".concat(redirectUri));
|
|
2093
2091
|
Object(_validate__WEBPACK_IMPORTED_MODULE_21__["assert"])(Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isNonEmptyString"])(state), "the state parameter should be a non empty string but it is ".concat(state));
|
|
2094
2092
|
return this._oauthService.makeUrl('oauth/authorize', {
|
|
@@ -2132,7 +2130,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2132
2130
|
key: "accountUrl",
|
|
2133
2131
|
value: function accountUrl() {
|
|
2134
2132
|
var redirectUri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.redirectUri;
|
|
2135
|
-
return this._spid.makeUrl('
|
|
2133
|
+
return this._spid.makeUrl('profile-pages', {
|
|
2136
2134
|
response_type: 'code',
|
|
2137
2135
|
redirect_uri: redirectUri
|
|
2138
2136
|
});
|
|
@@ -2147,7 +2145,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2147
2145
|
key: "phonesUrl",
|
|
2148
2146
|
value: function phonesUrl() {
|
|
2149
2147
|
var redirectUri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.redirectUri;
|
|
2150
|
-
return this._spid.makeUrl('
|
|
2148
|
+
return this._spid.makeUrl('profile-pages/about-you/phone', {
|
|
2151
2149
|
response_type: 'code',
|
|
2152
2150
|
redirect_uri: redirectUri
|
|
2153
2151
|
});
|
|
@@ -2242,6 +2240,10 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2242
2240
|
}
|
|
2243
2241
|
};
|
|
2244
2242
|
|
|
2243
|
+
if (options && options.locale) {
|
|
2244
|
+
initialParams.locale = options.locale;
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2245
2247
|
var loginHandler = /*#__PURE__*/function () {
|
|
2246
2248
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
2247
2249
|
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
@@ -11512,7 +11514,7 @@ function emulate(global) {
|
|
|
11512
11514
|
/* 174 */
|
|
11513
11515
|
/***/ (function(module) {
|
|
11514
11516
|
|
|
11515
|
-
module.exports = JSON.parse("{\"name\":\"@schibsted/account-sdk-browser\",\"version\":\"4.
|
|
11517
|
+
module.exports = JSON.parse("{\"name\":\"@schibsted/account-sdk-browser\",\"version\":\"4.7.2\",\"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\"}");
|
|
11516
11518
|
|
|
11517
11519
|
/***/ })
|
|
11518
11520
|
/******/ ]);
|