oro-sdk 2.13.0 → 2.14.0
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/dist/client.d.ts +1 -1
- package/dist/oro-sdk.cjs.development.js +59 -57
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +59 -57
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +7 -3
- package/LICENSE +0 -21
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "2.
|
2
|
+
"version": "2.14.0",
|
3
3
|
"main": "dist/index.js",
|
4
4
|
"typings": "dist/index.d.ts",
|
5
5
|
"files": [
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"form-data": "^4.0.0",
|
60
60
|
"formdata-node": "^4.3.1",
|
61
61
|
"idb-keyval": "^5.0.6",
|
62
|
-
"oro-sdk-apis": "1.
|
62
|
+
"oro-sdk-apis": "1.10.0",
|
63
63
|
"oro-toolbox": "0.0.6",
|
64
64
|
"uuid": "^8.3.2"
|
65
65
|
}
|
package/src/client.ts
CHANGED
@@ -109,7 +109,8 @@ export class OroClient {
|
|
109
109
|
practice: Practice,
|
110
110
|
tosAndCpAcceptance: TosAndCpAcceptanceRequest,
|
111
111
|
tokenData?: TokenData,
|
112
|
-
subscription?: boolean
|
112
|
+
subscription?: boolean,
|
113
|
+
skipEmailValidation?: boolean
|
113
114
|
): Promise<IdentityResponse> {
|
114
115
|
this.rsa = new CryptoRSA()
|
115
116
|
const privateKey = this.rsa.private()
|
@@ -119,9 +120,12 @@ export class OroClient {
|
|
119
120
|
|
120
121
|
const hashedPassword = this.toolbox.hashStringToBase64(this.toolbox.hashStringToBase64(password))
|
121
122
|
|
123
|
+
const emailConfirmed = !!skipEmailValidation
|
124
|
+
|
122
125
|
const signupRequest: IdentityCreateRequest = {
|
123
126
|
practiceUuid: practice.uuid,
|
124
127
|
email: email.toLowerCase(),
|
128
|
+
emailConfirmed,
|
125
129
|
password: hashedPassword,
|
126
130
|
publicKey: this.toolbox.encodeToBase64(this.rsa.public()),
|
127
131
|
recoveryPassword,
|
@@ -1415,7 +1419,7 @@ export class OroClient {
|
|
1415
1419
|
recoverySecurityAnswers: string[],
|
1416
1420
|
threshold: number
|
1417
1421
|
) {
|
1418
|
-
let shards: SecretShard[] = (await this.guardClient.identityGet(id)).recoverySecurityQuestions
|
1422
|
+
let shards: SecretShard[] = (await this.guardClient.identityGet(id)).recoverySecurityQuestions!
|
1419
1423
|
let answeredShards = shards
|
1420
1424
|
.filter((shard: any) => {
|
1421
1425
|
// filters all answered security questions
|
@@ -1470,7 +1474,7 @@ export class OroClient {
|
|
1470
1474
|
* @param masterKey
|
1471
1475
|
*/
|
1472
1476
|
public async recoverPrivateKeyFromMasterKey(id: Uuid, masterKey: string) {
|
1473
|
-
let recoveryPayload = (await this.guardClient.identityGet(id)).recoveryMasterKey
|
1477
|
+
let recoveryPayload = (await this.guardClient.identityGet(id)).recoveryMasterKey!
|
1474
1478
|
let symmetricDecryptor = this.toolbox.CryptoChaCha.fromPassphrase(masterKey)
|
1475
1479
|
let privateKey = symmetricDecryptor.base64PayloadDecryptToBytes(recoveryPayload)
|
1476
1480
|
this.rsa = this.toolbox.CryptoRSA.fromKey(privateKey)
|
package/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2021 ORO Health Inc.
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|