Socket
Socket
Sign inDemoInstall

@workos-inc/node

Package Overview
Dependencies
Maintainers
6
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@workos-inc/node - npm Package Compare versions

Comparing version 7.19.0 to 7.20.0

7

lib/user-management/user-management.d.ts

@@ -90,3 +90,10 @@ import { AutoPaginatable } from '../common/utils/pagination';

}): string;
/**
* getLogoutUrlFromSessionCookie takes in session cookie data, unseals the cookie, decodes the JWT claims,
* and uses the session ID to generate the logout URL.
*
* Use this over `getLogoutUrl` if you'd like to the SDK to handle session cookies for you.
*/
getLogoutUrlFromSessionCookie({ sessionData, cookiePassword, }: SessionHandlerOptions): Promise<string>;
getJwksUrl(clientId: string): string;
}

@@ -503,2 +503,21 @@ "use strict";

}
/**
* getLogoutUrlFromSessionCookie takes in session cookie data, unseals the cookie, decodes the JWT claims,
* and uses the session ID to generate the logout URL.
*
* Use this over `getLogoutUrl` if you'd like to the SDK to handle session cookies for you.
*/
getLogoutUrlFromSessionCookie({ sessionData, cookiePassword = process.env.WORKOS_COOKIE_PASSWORD, }) {
return __awaiter(this, void 0, void 0, function* () {
const authenticationResponse = yield this.authenticateWithSessionCookie({
sessionData,
cookiePassword,
});
if (!authenticationResponse.authenticated) {
const { reason } = authenticationResponse;
throw new Error(`Failed to extract session ID for logout URL: ${reason}`);
}
return this.getLogoutUrl({ sessionId: authenticationResponse.sessionId });
});
}
getJwksUrl(clientId) {

@@ -505,0 +524,0 @@ if (!clientId) {

13

lib/workos.js

@@ -30,3 +30,3 @@ "use strict";

const fetch_client_1 = require("./common/net/fetch-client");
const VERSION = '7.19.0';
const VERSION = '7.20.0';
const DEFAULT_HOSTNAME = 'api.workos.com';

@@ -38,3 +38,2 @@ const HEADER_AUTHORIZATION = 'Authorization';

constructor(key, options = {}) {
var _a;
this.key = key;

@@ -54,3 +53,6 @@ this.options = options;

// process might be undefined in some environments
this.key = process === null || process === void 0 ? void 0 : process.env.WORKOS_API_KEY;
this.key =
typeof process !== 'undefined'
? process === null || process === void 0 ? void 0 : process.env.WORKOS_API_KEY
: undefined;
if (!this.key) {

@@ -63,3 +65,6 @@ throw new exceptions_1.NoApiKeyProvidedException();

}
this.clientId = (_a = this.options.clientId) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env.WORKOS_CLIENT_ID;
this.clientId = this.options.clientId;
if (!this.clientId && typeof process !== 'undefined') {
this.clientId = process === null || process === void 0 ? void 0 : process.env.WORKOS_CLIENT_ID;
}
const protocol = this.options.https ? 'https' : 'http';

@@ -66,0 +71,0 @@ const apiHostname = this.options.apiHostname || DEFAULT_HOSTNAME;

{
"version": "7.19.0",
"version": "7.20.0",
"name": "@workos-inc/node",

@@ -4,0 +4,0 @@ "author": "WorkOS",

Sorry, the diff of this file is too big to display

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