@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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.7.2 (2023-01-31)
4
+ * Update path to Schibsted account profile pages.
5
+
6
+ ## v4.7.1 (2023-01-24)
7
+ * Add support for eID Finland
8
+
9
+ ## v4.7.0 (2022-10-27)
10
+ * Add locale support in the Simplified Login widget
11
+
3
12
  ## v4.6.0 (2022-02-23)
4
13
 
5
14
  ## New features
package/README.md CHANGED
@@ -308,20 +308,14 @@ mentioning that your end users have a few ways to log in:
308
308
  self-chosen password
309
309
  * Passwordless - email: here, the users enter their email address and receive a one-time code that
310
310
  they can use to log in
311
- * Passwordless - SMS (BETA): similar to the previous method but instead of an email address, they receive
312
- the code on their phone as an SMS
313
311
  * Multifactor authentication: first client indicates which methods should be preferred, later these
314
- will be included (if fulfilled) in `AMR` claim of IDToken
315
-
316
- IMPORTANT: Passwordless using SMS is still in BETA. It's only recommended to use it for testing and
317
- experimental purposes for now. Please let us know before using this in production.
312
+ will be included (if fulfilled) in `AMR` claim of IDToken
318
313
 
319
314
  The default is username & password. If you wish to use one of the passwordless login methods, the
320
315
  `login()` function takes an optional parameter called `acrValues` (Authentication Context Class Reference).
321
316
  The `acrValues` parameter with multifactor authentication can take following values:
322
317
  - `eid` - authentication using BankID (for DEV and PRE environments you can choose between country specific solution by specifying `eid-no` or `eid-se` instead)
323
318
  - `otp-email` - passwordless authentication using code sent to registered email
324
- - `otp-sms` - passwordless authentication using code sent to registered phone number
325
319
  - `password` - force password authentication (even if user is already logged in)
326
320
  - `otp` - authentication using registered one time code generator (https://tools.ietf.org/html/rfc6238)
327
321
  - `sms` - authentication using SMS code sent to phone number
package/es5/global.js CHANGED
@@ -1967,8 +1967,7 @@ var _require = __webpack_require__(175),
1967
1967
  * be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
1968
1968
  * to verify AMR (Authentication Methods References) claim in ID token.
1969
1969
  * Might also be used to ensure additional acr (sms, otp) for already logged in users.
1970
- * Supported values are also 'otp-email' means one time password using email, and 'otp-sms' means
1971
- * one time password using sms.
1970
+ * Supported value is also 'otp-email' means one time password using email.
1972
1971
  * @property {string} [scope] - The OAuth scopes for the tokens. This is a list of
1973
1972
  * scopes, separated by space. If the list of scopes contains `openid`, the generated tokens
1974
1973
  * includes the id token which can be useful for getting information about the user. Omitting
@@ -2003,8 +2002,7 @@ var _require = __webpack_require__(175),
2003
2002
  * be mixed as space-separated string. To make sure that user has authenticated with 2FA you need
2004
2003
  * to verify AMR (Authentication Methods References) claim in ID token.
2005
2004
  * Might also be used to ensure additional acr (sms, otp) for already logged in users.
2006
- * Supported values are also 'otp-email' means one time password using email, and 'otp-sms' means
2007
- * one time password using sms.
2005
+ * Supported value is also 'otp-email' means one time password using email.
2008
2006
  * @property {string} [scope] - The OAuth scopes for the tokens. This is a list of
2009
2007
  * scopes, separated by space. If the list of scopes contains `openid`, the generated tokens
2010
2008
  * includes the id token which can be useful for getting information about the user. Omitting
@@ -3084,10 +3082,10 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
3084
3082
  }
3085
3083
 
3086
3084
  var isValidAcrValue = function isValidAcrValue(acrValue) {
3087
- 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);
3088
3086
  };
3089
3087
 
3090
- Object(_validate__WEBPACK_IMPORTED_MODULE_21__["assert"])(!acrValues || Object(_validate__WEBPACK_IMPORTED_MODULE_21__["isStrIn"])(acrValues, ['', 'otp-email', 'otp-sms'], true) || acrValues.split(' ').every(isValidAcrValue), "The acrValues parameter is not acceptable: ".concat(acrValues));
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));
3091
3089
  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));
3092
3090
  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));
3093
3091
  return this._oauthService.makeUrl('oauth/authorize', {
@@ -3131,7 +3129,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
3131
3129
  key: "accountUrl",
3132
3130
  value: function accountUrl() {
3133
3131
  var redirectUri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.redirectUri;
3134
- return this._spid.makeUrl('account/summary', {
3132
+ return this._spid.makeUrl('profile-pages', {
3135
3133
  response_type: 'code',
3136
3134
  redirect_uri: redirectUri
3137
3135
  });
@@ -3146,7 +3144,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
3146
3144
  key: "phonesUrl",
3147
3145
  value: function phonesUrl() {
3148
3146
  var redirectUri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.redirectUri;
3149
- return this._spid.makeUrl('account/phones', {
3147
+ return this._spid.makeUrl('profile-pages/about-you/phone', {
3150
3148
  response_type: 'code',
3151
3149
  redirect_uri: redirectUri
3152
3150
  });
@@ -3241,6 +3239,10 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
3241
3239
  }
3242
3240
  };
3243
3241
 
3242
+ if (options && options.locale) {
3243
+ initialParams.locale = options.locale;
3244
+ }
3245
+
3244
3246
  var loginHandler = /*#__PURE__*/function () {
3245
3247
  var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
3246
3248
  return regeneratorRuntime.wrap(function _callee10$(_context10) {
@@ -11549,7 +11551,7 @@ function emulate(global) {
11549
11551
  /* 175 */
11550
11552
  /***/ (function(module) {
11551
11553
 
11552
- module.exports = JSON.parse("{\"name\":\"@schibsted/account-sdk-browser\",\"version\":\"4.6.0\",\"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\"}");
11554
+ 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\"}");
11553
11555
 
11554
11556
  /***/ }),
11555
11557
  /* 176 */