Skip to content

Commit

Permalink
Release 5.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
smooch-ci-web committed Jan 18, 2023
1 parent 6757201 commit 3ccde6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1045,14 +1045,14 @@ Smooch.init({

#### onInvalidAuth

The `onInvalidAuth` delegate notifies the delegate of a failed request due to invalid credentials and allows the implementer to set a new auth token in order to retry the request. The delegate must return a new JWT token as a `string` or `Promise<string>` that will resolve into the JWT.
The `onInvalidAuth` delegate notifies the delegate of a failed request due to invalid credentials and allows the implementer to set a new auth token in order to retry the request. The delegate returns a `Promise<string>` that resolves a new valid JWT asynchronously.

```javascript
Smooch.init({
integrationId: '<integration-id>',
delegate: {
onInvalidAuth() {
return '<my-new-auth-token>';
return new Promise((resolve) => resolve('<my-new-auth-token>'));
},
},
});
Expand Down
Loading

0 comments on commit 3ccde6e

Please sign in to comment.