@getpara/web-sdk 2.8.0 → 2.10.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.
|
@@ -4,9 +4,9 @@ export declare function parseCredentialCreationRes(creds: any, algorithm: number
|
|
|
4
4
|
clientDataJSON: string;
|
|
5
5
|
aaguid: string;
|
|
6
6
|
};
|
|
7
|
-
export declare function createCredential(env: Environment, userId: string, identifier: string, isE2E?: boolean): Promise<{
|
|
7
|
+
export declare function createCredential(env: Environment, userId: string, identifier: string, isE2E?: boolean, rpIdOverride?: string): Promise<{
|
|
8
8
|
creds: any;
|
|
9
9
|
userHandle: string;
|
|
10
10
|
algorithm: number;
|
|
11
11
|
}>;
|
|
12
|
-
export declare function generateSignature(env: Environment, challenge: string, allowedPublicKeys: string[], isE2E?: boolean): Promise<any>;
|
|
12
|
+
export declare function generateSignature(env: Environment, challenge: string, allowedPublicKeys: string[], isE2E?: boolean, rpIdOverride?: string): Promise<any>;
|
|
@@ -93,7 +93,7 @@ function generateUserHandle() {
|
|
|
93
93
|
window.crypto.getRandomValues(userHandle);
|
|
94
94
|
return userHandle;
|
|
95
95
|
}
|
|
96
|
-
function createCredential(env, userId, identifier, isE2E) {
|
|
96
|
+
function createCredential(env, userId, identifier, isE2E, rpIdOverride) {
|
|
97
97
|
return __async(this, null, function* () {
|
|
98
98
|
if (typeof navigator === "undefined") {
|
|
99
99
|
return;
|
|
@@ -108,7 +108,7 @@ function createCredential(env, userId, identifier, isE2E) {
|
|
|
108
108
|
userVerification: "required"
|
|
109
109
|
},
|
|
110
110
|
rp: {
|
|
111
|
-
id: getPortalDomain(env, isE2E, true),
|
|
111
|
+
id: rpIdOverride || getPortalDomain(env, isE2E, true),
|
|
112
112
|
name: "Para"
|
|
113
113
|
},
|
|
114
114
|
user: {
|
|
@@ -137,7 +137,7 @@ function createCredential(env, userId, identifier, isE2E) {
|
|
|
137
137
|
};
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
function generateSignature(env, challenge, allowedPublicKeys, isE2E) {
|
|
140
|
+
function generateSignature(env, challenge, allowedPublicKeys, isE2E, rpIdOverride) {
|
|
141
141
|
return __async(this, null, function* () {
|
|
142
142
|
const getCredentialDefaultArgs = {
|
|
143
143
|
publicKey: {
|
|
@@ -148,7 +148,7 @@ function generateSignature(env, challenge, allowedPublicKeys, isE2E) {
|
|
|
148
148
|
type: "public-key"
|
|
149
149
|
})),
|
|
150
150
|
userVerification: "required",
|
|
151
|
-
rpId: getPortalDomain(env, isE2E, true)
|
|
151
|
+
rpId: rpIdOverride || getPortalDomain(env, isE2E, true)
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
const assertation = yield navigator.credentials.get(getCredentialDefaultArgs);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/web-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/core-sdk": "2.
|
|
6
|
-
"@getpara/user-management-client": "2.
|
|
5
|
+
"@getpara/core-sdk": "2.10.0",
|
|
6
|
+
"@getpara/user-management-client": "2.10.0",
|
|
7
7
|
"base64url": "^3.0.1",
|
|
8
8
|
"buffer": "6.0.3",
|
|
9
9
|
"cbor-web": "^9.0.2",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dist",
|
|
29
29
|
"package.json"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "8da2c51cc91f021acbc2ec7373b9ca0638fc840a",
|
|
32
32
|
"main": "dist/index.js",
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs && yarn post-build",
|