@schibsted/account-sdk-browser 4.8.6-beta → 4.8.7-beta
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/LICENSE.md +1 -1
- package/README.md +12 -12
- package/es5/global.js +1852 -1855
- 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 +1590 -1593
- 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 +1852 -1855
- 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 +20 -21
- 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 +19 -20
- package/es5/payment.js.map +1 -1
- package/es5/payment.min.js.map +1 -1
- package/identity.js +1 -1
- package/index.js +1 -1
- package/monetization.js +1 -1
- package/package.json +3 -6
- package/payment.js +1 -1
- package/src/RESTClient.js +1 -1
- package/src/SDKError.js +1 -1
- package/src/cache.js +1 -1
- package/src/config.js +1 -1
- package/src/es5/global.js +1 -1
- package/src/es5/identity.js +1 -1
- package/src/es5/index.js +1 -1
- package/src/es5/monetization.js +1 -1
- package/src/es5/payment.js +1 -1
- package/src/identity.d.ts +6 -1
- package/src/identity.js +28 -15
- package/src/monetization.js +1 -1
- package/src/object.js +9 -9
- package/src/payment.js +1 -1
- package/src/popup.js +1 -1
- package/src/spidTalk.js +1 -1
- package/src/url.js +1 -1
- package/src/validate.js +1 -1
- package/src/version.js +1 -1
package/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2024 Schibsted Products & Technology AS
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
4
4
|
associated documentation files (the "Software"), to deal in the Software without restriction,
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[](https://github.com/schibsted/account-sdk-browser)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
[](https://codecov.io/gh/schibsted/account-sdk-browser)
|
|
5
5
|
[](https://snyk.io/test/github/schibsted/account-sdk-browser)
|
|
6
6
|
|
|
@@ -17,22 +17,22 @@ 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
|
|
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
|
|
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
|
|
26
|
-
|
|
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'
|
|
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
|
|
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
|
|
@@ -194,7 +194,7 @@ will remove the Schibsted account brand session. User will still be logged into
|
|
|
194
194
|
|
|
195
195
|
The preferred method for checking whether a user has access to a product/subscription is
|
|
196
196
|
[Monetization#hasAccess](https://schibsted.github.io/account-sdk-browser/Monetization.html#hasAccess).
|
|
197
|
-
It requires using
|
|
197
|
+
It requires using Session Service, and supports both Schibsted account productId's and Zuora
|
|
198
198
|
feature id's.
|
|
199
199
|
|
|
200
200
|
#### Example
|
|
@@ -247,7 +247,7 @@ paymentSDK.payWithPaylink(paylink)
|
|
|
247
247
|
#### Polyfills
|
|
248
248
|
|
|
249
249
|
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
|
|
250
|
+
babel to transform the JavaScript as needed. However, since certain teams have deployment pipelines
|
|
251
251
|
where it's difficult to do their own transpilation, we do provide some opt-in es5 files as well:
|
|
252
252
|
|
|
253
253
|
1. `@schibsted/account-sdk-browser/es5`: Include both `Identity`, `Monetization` and `Payment`.
|
|
@@ -303,12 +303,12 @@ Tags are pushed to NPM via Travis. To release a new version, run in master
|
|
|
303
303
|
$ npm version <major|minor|patch>
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
which will run the test, update version in package.json,
|
|
306
|
+
which will run the test, update version in package.json, commit, tag the commit
|
|
307
307
|
and push.
|
|
308
308
|
|
|
309
309
|
## LICENSE
|
|
310
310
|
|
|
311
|
-
Copyright (c)
|
|
311
|
+
Copyright (c) 2024 Schibsted Products & Technology AS
|
|
312
312
|
|
|
313
313
|
Licensed under the [MIT
|
|
314
314
|
License](https://github.com/schibsted/account-sdk-browser/blob/master/LICENSE.md)
|