Skip to content

Commit

Permalink
Add events
Browse files Browse the repository at this point in the history
  • Loading branch information
WietseWind authored Nov 12, 2022
1 parent b0b4684 commit 676da31
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ document.getElementById("somebutton").onclick = () => {
};
```

#### Events (emitted)

- `success` = User signed in successfully, `sdk.state()` returns `.me` and `.sdk` objects
- `retrieved` = Retrieved existing session after e.g. browser refresh or mobile redirect, `sdk.state()` returns `.me` and `.sdk` objects
- `error` = Error, expected (e.g. user cancelled) or unexpected (...), returns argument `error` with an `Error()` object, `sdk.state()` returns null


### CDN (browser):

A browserified version (latest) is available at [JSDelivr](https://cdn.jsdelivr.net/npm/xumm-oauth2-pkce/dist/browser.min.js) & direclty from the `xumm.app` domain:
Expand Down

0 comments on commit 676da31

Please sign in to comment.