New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@streamlayer/sdk-web-anonymous-auth

Package Overview
Dependencies
Maintainers
15
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@streamlayer/sdk-web-anonymous-auth - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "@streamlayer/sdk-web-anonymous-auth",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -7,2 +7,2 @@ import { StreamLayerContext } from '@streamlayer/sdk-web';

}
export declare const anonymous: (instance: StreamLayerContext, opts: any, done: any) => void;
export declare const anonymous: (instance: StreamLayerContext, opts: unknown, done: () => void) => void;

@@ -8,6 +8,9 @@ import { queries } from '@streamlayer/sdk-web-api';

} || opts;
const organization = await instance.sdk.sdkStore().getStoreItem('organizationSettings').getValue();
const userKey = `${organization.pub.kid}`;
const organization = await instance.stores.organizationSettings.getValue();
if (!organization) {
throw new Error('unknown organization');
}
const userKey = `${organization.pub?.kid}`;
const schema = `${schemaName}:${organization.id}`;
const anonymous = await queries.bypassAuth(instance.sdk.transport, {
const anonymous = await queries.bypassAuth(instance.transport, {
userKey,

@@ -17,3 +20,3 @@ schema,

});
const token = anonymous.meta.token;
const token = anonymous.meta?.token;
const pubKey = organization.pub;

@@ -28,3 +31,3 @@ const pub = await importJWK({

}).setProtectedHeader({
alg: pubKey.alg,
alg: pubKey.alg || '',
enc: 'A256CBC-HS512',

@@ -31,0 +34,0 @@ kid: pubKey.kid

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc