@schibsted/account-sdk-browser 4.8.7 → 5.0.0-beta.1

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,6 @@
1
1
  [![logo](https://www.schibsted.com/Global/LogoTypes/Logos%202014/SMG_Small_2014_RGB.png)](https://github.com/schibsted/account-sdk-browser)
2
2
 
3
- [![Build Status](https://app.travis-ci.com/schibsted/account-sdk-browser.svg?branch=master)](https://app.travis-ci.com/schibsted/account-sdk-browser)
3
+ ![Build Status](https://github.com/schibsted/account-sdk-browser/actions/workflows/pr.yml/badge.svg)
4
4
  [![Code coverage](https://codecov.io/gh/schibsted/account-sdk-browser/branch/master/graph/badge.svg)](https://codecov.io/gh/schibsted/account-sdk-browser)
5
5
  [![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
6
 
@@ -17,27 +17,31 @@ This sdk mainly communicates with a service named Session Service, which is avai
17
17
  domains (i.e. id.vg.no) to avoid Third-Party Cookie request.
18
18
 
19
19
  Since browsers started to block Third-Party Cookies, your top domain from local machine needs to
20
- match your session service top domain. Otherwise session service cookie will be Third-Party Cookie,
21
- and will not be sent with XHR request.
20
+ match your Session Service top domain. Otherwise, the Session Service cookie will be a third-party cookie
21
+ and will not be sent with a XHR request.
22
22
 
23
- The same applies to cross scheme requests. The session service is hosted on https and therefore you need to [run your site with HTTPS locally](https://web.dev/how-to-use-local-https/).
23
+ The same applies to cross scheme requests. The Session Service is hosted on https and therefore you need to [run your site with HTTPS locally](https://web.dev/how-to-use-local-https/).
24
24
 
25
- For example if your `pre` domain is pre.sdk-example.com, and it uses id.pre.sdk-example.com session
26
- service domain, your local domain should be local.sdk-example.com.
25
+ For example if your `pre` domain is pre.sdk-example.com, and it uses id.pre.sdk-example.com Session Service
26
+ domain, your local domain should be local.sdk-example.com.
27
27
 
28
28
  1. Do `npm install --save @schibsted/account-sdk-browser`
29
29
  1. Use this library as you would any other npm module: `import { Identity, Monetization, Payment } from '@schibsted/account-sdk-browser'`
30
30
  With CommonJS it is possible to `require` the modules Identity, Monetization and Payment
31
- by appending `/identity`, `/monetization'` or `/payment'` at the end.
31
+ by appending `/identity`, `/monetization'` or `/payment'`.
32
32
  1. Build your site as you prefer. This library uses modern JavaScript syntax (including async/await
33
33
  and other ES2017 and WHATWG features) by default. We recommend that you do any transpilation
34
34
  yourself for the browser versions you need to cater to. See [this paragraph](#polyfills) for
35
- info about our babelified version and info about polyfills.
35
+ info about our Babel-ified version and info about polyfills.
36
36
  1. Initiate the SDK and provide at least `clientId`, `env` and `sessionDomain`.
37
37
 
38
38
  If this is for a new site and there is no sessionDomain yet, contact
39
39
  [support](mailto:schibstedaccount@schibsted.com) to initiate the process.
40
40
 
41
+ ## Migration to 5.x.x (ITP)
42
+
43
+ Follow the [migration guide](./MIGRATION.md).
44
+
41
45
  ## Simplified login widget
42
46
 
43
47
  1. Ensure that your site has no site specific terms and conditions in the Schibsted account login flow.
@@ -194,7 +198,7 @@ will remove the Schibsted account brand session. User will still be logged into
194
198
 
195
199
  The preferred method for checking whether a user has access to a product/subscription is
196
200
  [Monetization#hasAccess](https://schibsted.github.io/account-sdk-browser/Monetization.html#hasAccess).
197
- It requires using session-service, and supports both Schibsted account productId's and Zuora
201
+ It requires using Session Service, and supports both Schibsted account productId's and Zuora
198
202
  feature id's.
199
203
 
200
204
  #### Example
@@ -247,7 +251,7 @@ paymentSDK.payWithPaylink(paylink)
247
251
  #### Polyfills
248
252
 
249
253
  This SDK uses modern JavaScript features. If you support older browsers, you should use a tool like
250
- babel to transform the JavaScript as needed. However since certain teams have deployment pipelines
254
+ babel to transform the JavaScript as needed. However, since certain teams have deployment pipelines
251
255
  where it's difficult to do their own transpilation, we do provide some opt-in es5 files as well:
252
256
 
253
257
  1. `@schibsted/account-sdk-browser/es5`: Include both `Identity`, `Monetization` and `Payment`.