@corti/dictation-web 0.1.21-rc.5 → 0.1.21
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 +2 -8
- package/dist/bundle.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -111,13 +111,8 @@ The library can automatically refresh tokens when they expire:
|
|
|
111
111
|
|
|
112
112
|
```javascript
|
|
113
113
|
dictation.setAuthConfig({
|
|
114
|
-
accessToken: 'YOUR_JWT_TOKEN',
|
|
115
|
-
refreshToken: 'YOUR_REFRESH_TOKEN',
|
|
116
|
-
expiresIn: 3600, // Access token expires in 1 hour
|
|
117
|
-
refreshExpiresIn: 86400, // Refresh token expires in 24 hours
|
|
118
|
-
|
|
119
114
|
// This function runs before any API call when the access_token is near expiration
|
|
120
|
-
refreshAccessToken: async (refreshToken
|
|
115
|
+
refreshAccessToken: async (refreshToken?: string) => {
|
|
121
116
|
// Custom refresh logic -- get new access_token from server
|
|
122
117
|
const response = await fetch("https://your-auth-server/refresh", {
|
|
123
118
|
method: "POST",
|
|
@@ -130,12 +125,11 @@ dictation.setAuthConfig({
|
|
|
130
125
|
// Return in the expected format
|
|
131
126
|
return {
|
|
132
127
|
accessToken: result.accessToken,
|
|
133
|
-
tokenType: result.tokenType || 'Bearer',
|
|
134
128
|
expiresIn: result.expiresIn || 3600,
|
|
135
129
|
refreshToken: result.refreshToken,
|
|
136
130
|
refreshExpiresIn: result.refreshExpiresIn,
|
|
137
131
|
};
|
|
138
|
-
}
|
|
132
|
+
}
|
|
139
133
|
});
|
|
140
134
|
```
|
|
141
135
|
|
package/dist/bundle.js
CHANGED
|
@@ -8346,7 +8346,7 @@ var Transcribe2 = class extends Transcribe {
|
|
|
8346
8346
|
};
|
|
8347
8347
|
|
|
8348
8348
|
// node_modules/@corti/sdk/dist/esm/version.mjs
|
|
8349
|
-
var SDK_VERSION = "0.1.
|
|
8349
|
+
var SDK_VERSION = "0.1.2";
|
|
8350
8350
|
|
|
8351
8351
|
// node_modules/@corti/sdk/dist/esm/custom/CortiClient.mjs
|
|
8352
8352
|
var __awaiter28 = function(thisArg, _arguments, P2, generator) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@corti/dictation-web",
|
|
3
3
|
"description": "Web component for Corti Dictation",
|
|
4
4
|
"author": "Corti ApS",
|
|
5
|
-
"version": "0.1.21
|
|
5
|
+
"version": "0.1.21",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"storybook:build": "tsc && npm run analyze -- --exclude dist && storybook build"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@corti/sdk": "^0.1.2
|
|
54
|
+
"@corti/sdk": "^0.1.2",
|
|
55
55
|
"lit": "^3.1.4"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|