vezgo-sdk-js
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -7,2 +7,5 @@ # Changelog | ||
## [1.0.1] | ||
- Readme fix | ||
## [1.0.0] | ||
@@ -104,4 +107,5 @@ Note: Latest Vezgo Connect requires to be opened via `POST` request with `token` in the form data. | ||
[Unreleased]: https://github.com/wealthica/vezgo-sdk-js/compare/v1.0.0...HEAD | ||
[0.0.16]: https://github.com/wealthica/vezgo-sdk-js/compare/v0.0.16...v1.0.0 | ||
[Unreleased]: https://github.com/wealthica/vezgo-sdk-js/compare/v1.0.1...HEAD | ||
[1.0.1]: https://github.com/wealthica/vezgo-sdk-js/compare/v1.0.0...v1.0.1 | ||
[1.0.0]: https://github.com/wealthica/vezgo-sdk-js/compare/v0.0.16...v1.0.0 | ||
[0.0.16]: https://github.com/wealthica/vezgo-sdk-js/compare/v0.0.15...v0.0.16 | ||
@@ -108,0 +112,0 @@ [0.0.15]: https://github.com/wealthica/vezgo-sdk-js/compare/v0.0.14...v0.0.15 |
{ | ||
"name": "vezgo-sdk-js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Official Vezgo JS SDK for the Browser & NodeJS", | ||
@@ -5,0 +5,0 @@ "author": "Wealthica Financial Technology Inc. <hello@wealthica.com> (https://wealthica.com/)", |
@@ -159,3 +159,3 @@ # vezgo-sdk-js | ||
```javascript | ||
const url = await user.getConnectData({ | ||
const { url, token } = await user.getConnectData({ | ||
provider: 'coinbase', // optional | ||
@@ -178,2 +178,17 @@ // required for server-side, optional for client (browser, ReactNative) or if already passed to `Vezgo.init()`. | ||
// POST Vezgo Connect URL from client (browser/ReactNative) example: | ||
const form = document.createElement("form"); | ||
form.method = "POST"; | ||
form.action = url; | ||
const input = document.createElement("input"); | ||
input.type = "hidden"; | ||
input.name = "token"; | ||
input.value = token; | ||
form.appendChild(input); | ||
document.body.appendChild(form); | ||
form.submit(); | ||
// Alternatively, pass redirectURI once to `Vezgo.init()` | ||
@@ -188,6 +203,6 @@ const vezgo = Vezgo.init({ | ||
const user1 = vezgo.login('USER_ID_1'); | ||
const url1 = await user1.getConnectData(); | ||
const { url: url1, token } = await user1.getConnectData(); | ||
const user2 = vezgo.login('USER_ID_2'); | ||
const url2 = await user2.getConnectData(); | ||
const { url: url2, token } = await user2.getConnectData(); | ||
``` | ||
@@ -194,0 +209,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7733711
628
7