idmission-web-sdk 1.0.52 → 1.0.53

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
@@ -4,6 +4,26 @@ Demo: https://websdk2demo.idmission.com
4
4
 
5
5
  Storybook: https://websdk2test.idmission.com
6
6
 
7
+ ## Getting Started
8
+
9
+ Before using the IDmission WebSDK, you should make sure you can fetch a token. New customers receive their token generation credentials via email. If you haven't received them, reach out to support@idmission.com.
10
+
11
+ To test that your credentials are valid:
12
+ ```bash
13
+ curl --location --request POST 'https://auth.idmission.com/auth/realms/identity/protocol/openid-connect/token' \
14
+ --header 'Content-Type: application/x-www-form-urlencoded' \
15
+ --data-urlencode 'grant_type=password' \
16
+ --data-urlencode 'client_id=' \
17
+ --data-urlencode 'client_secret=' \
18
+ --data-urlencode 'username=' \
19
+ --data-urlencode 'password=' \
20
+ --data-urlencode 'scope=api_access'
21
+ ```
22
+
23
+ Prior to initializing the WebSDK on the client, you should generate a token on your server using these credentials. Be careful not to leak them on the client side! The generated token is safe to pass to the client, but the secrets used to generate them are not. If you have inadvertently leaked your client secret, react out to support@idmission.com to rotate your credentials.
24
+
25
+ If you are using NodeJS, check out our [auth client for server-side JavaScript](https://www.npmjs.com/package/idmission-auth-client).
26
+
7
27
  ## Basic Usage in Typescript/React
8
28
 
9
29
  ```bash
@@ -22,7 +42,7 @@ render(<IdValidation submissionToken={YOUR_TOKEN} />, document.getElementById('r
22
42
 
23
43
  Add the following script tag to your page's `<head>`:
24
44
  ```html
25
- <script type=“module” src="https://websdk-cdn-dev.idmission.com/websdk/prod/loader.js"></script>
45
+ <script type="module" src="https://websdk-cdn-dev.idmission.com/websdk/prod/loader.js"></script>
26
46
  ```
27
47
 
28
48
  You may subscribe to the `idmission-web-sdk.ready` event to be notified when loading has completed.
@@ -48,7 +48,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
48
48
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
49
49
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
50
50
 
51
- var webSdkVersion = '1.0.52';
51
+ var webSdkVersion = '1.0.53';
52
52
 
53
53
  function getPlatform() {
54
54
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment