@monerium/sdk 2.0.17 → 2.0.18

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,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.18](https://github.com/monerium/sdk/compare/v2.0.17...v2.0.18) (2023-04-21)
4
+
5
+ ### Bug Fixes
6
+
7
+ - es6 module imports ([00edf8d](https://github.com/monerium/sdk/commit/00edf8d600e6944fbcc17da00351ffae9ee79b53))
8
+ - test credentials ([00edf8d](https://github.com/monerium/sdk/commit/00edf8d600e6944fbcc17da00351ffae9ee79b53))
9
+
10
+ ### Miscellaneous
11
+
12
+ - explain and add uppercase to the -randomness- ([5ed54d8](https://github.com/monerium/sdk/commit/5ed54d86a79b88293c595bd23ecf07cd30aafe63))
13
+
3
14
  ## [2.0.17](https://github.com/monerium/sdk/compare/v2.0.16...v2.0.17) (2023-02-25)
4
15
 
5
16
  ### Miscellaneous
package/README.md CHANGED
@@ -59,21 +59,25 @@ let authFlowUrl = client.getAuthFlowURI({
59
59
  signature: "0xValidSignature0df2b6c9e0fc067ab29bdbf322bec30aad7c46dcd97f62498a91ef7795957397e0f49426e000b0f500c347219ddd98dc5080982563055e918031c"
60
60
 
61
61
  })
62
+ // Store the code verifier in localStorage
63
+ window.localStorage.setItem("myCodeVerifier", client.code_verifier);
62
64
  // Redirecting to the Monerium onboarding / Authentication flow.
63
65
  window.location.replace(authFlowUrl)
66
+ ```
64
67
 
68
+ ```ts
65
69
  // As the final step of the flow, the customer will be routed back to the `redirect_uri` with a `code` parameter attached to it.
66
70
  // i.e. http://your-webpage.com/monerium-integration?code=1234abcd
67
71
 
68
72
  await client.auth({
69
- client_id: "your_client_authflow_uuid",
70
- code: new URLSearchParams(window.location.search).get('code'),
71
- code_verifier: client.code_verifier,
72
- redirect_url: "http://your-webpage.com/monerium-integration"
73
- })
73
+ client_id: "your_client_authflow_uuid",
74
+ code: new URLSearchParams(window.location.search).get("code"),
75
+ code_verifier: window.localStorage.getItem("myCodeVerifier"),
76
+ redirect_url: "http://your-webpage.com/monerium-integration",
77
+ });
74
78
 
75
79
  // User is now authenticated, get authentication data
76
- await client.getAuthContext()
80
+ await client.getAuthContext();
77
81
  ```
78
82
 
79
83
  ## Developing