@streamlayer/sdk-web-anonymous-auth 0.10.13 → 0.11.1
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/package.json +5 -5
package/lib/cjs/index.js
CHANGED
|
@@ -2093,7 +2093,7 @@ const anonymousAuth = async (instance, opts) => {
|
|
|
2093
2093
|
const pub = await jose.importJWK({ ...pubKey });
|
|
2094
2094
|
const deviceId = window.crypto.randomUUID();
|
|
2095
2095
|
const jwe = await new jose.EncryptJWT({ ["device-id"]: deviceId, totp: token }).setProtectedHeader({ alg: pubKey.alg || "", enc: "A256CBC-HS512", kid: pubKey.kid }).setIssuedAt().setIssuer(issuer).setAudience(organization.id).setExpirationTime("2m").encrypt(pub);
|
|
2096
|
-
return instance.
|
|
2096
|
+
return instance.auth.login(schema, jwe);
|
|
2097
2097
|
};
|
|
2098
2098
|
const anonymous = (instance, opts, done) => {
|
|
2099
2099
|
instance.sdk.anonymousAuthorization = async () => {
|
package/lib/es/index.js
CHANGED
|
@@ -2091,7 +2091,7 @@ const anonymousAuth = async (instance, opts) => {
|
|
|
2091
2091
|
const pub = await importJWK({ ...pubKey });
|
|
2092
2092
|
const deviceId = window.crypto.randomUUID();
|
|
2093
2093
|
const jwe = await new EncryptJWT({ ["device-id"]: deviceId, totp: token }).setProtectedHeader({ alg: pubKey.alg || "", enc: "A256CBC-HS512", kid: pubKey.kid }).setIssuedAt().setIssuer(issuer).setAudience(organization.id).setExpirationTime("2m").encrypt(pub);
|
|
2094
|
-
return instance.
|
|
2094
|
+
return instance.auth.login(schema, jwe);
|
|
2095
2095
|
};
|
|
2096
2096
|
const anonymous = (instance, opts, done) => {
|
|
2097
2097
|
instance.sdk.anonymousAuthorization = async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/sdk-web-anonymous-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"author": "StreamLayer, Inc (https://streamlayer.io)",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
{
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"jose": "^5.1.0",
|
|
27
|
-
"@streamlayer/sdk-web": "^0.28.
|
|
27
|
+
"@streamlayer/sdk-web": "^0.28.6"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@nx/devkit": "17.1.1",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"vite-tsconfig-paths": "^4.2.1",
|
|
40
40
|
"vite-plugin-dts": "^3.6.3",
|
|
41
41
|
"rollup-plugin-visualizer": "^5.9.2",
|
|
42
|
-
"@streamlayer/sdk-web-interfaces": "^0.18.
|
|
43
|
-
"@streamlayer/sdk-web-core": "^0.
|
|
44
|
-
"@streamlayer/sdk-web-api": "^0.0
|
|
42
|
+
"@streamlayer/sdk-web-interfaces": "^0.18.6",
|
|
43
|
+
"@streamlayer/sdk-web-core": "^0.16.1",
|
|
44
|
+
"@streamlayer/sdk-web-api": "^0.1.0"
|
|
45
45
|
}
|
|
46
46
|
}
|