Socket
Socket
Sign inDemoInstall

@stytch/vanilla-js

Package Overview
Dependencies
3
Maintainers
15
Versions
134
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.8.0 to 4.9.0

13

CHANGELOG.md
# @stytch/vanilla-js
## 4.9.0
### Minor Changes
- a0fbe9f: Add `stytch.onStateChange` event listener to headless clients
- a0fbe9f: Add `getInfo` method to user, session, member, and organization
### Patch Changes
- Updated dependencies [a0fbe9f]
- Updated dependencies [a0fbe9f]
- @stytch/core@2.13.0
## 4.8.0

@@ -4,0 +17,0 @@

17

dist/b2b/index.d.ts

@@ -1,2 +0,3 @@

import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, IHeadlessB2BPasswordClient, Callbacks, StyleConfig, StytchB2BUIConfig } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, B2BState, IHeadlessB2BPasswordClient, Callbacks, StyleConfig, StytchB2BUIConfig } from "@stytch/core/public";
/**

@@ -19,2 +20,3 @@ * A headless client used for invoking Stytch's B2B APIs.

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -35,2 +37,15 @@ magicLinks: IHeadlessB2BMagicLinksClient;

rbac: IHeadlessB2BRBACClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a member or session object being updated.
*
* This is an alternative to more specific methods like `self.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `self.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<B2BState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -37,0 +52,0 @@ }

@@ -1,2 +0,3 @@

import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, IHeadlessB2BPasswordClient, Callbacks, StyleConfig, StytchB2BUIConfig } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, B2BState, IHeadlessB2BPasswordClient, Callbacks, StyleConfig, StytchB2BUIConfig } from "@stytch/core/public";
/**

@@ -19,2 +20,3 @@ * A headless client used for invoking Stytch's B2B APIs.

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -35,2 +37,15 @@ magicLinks: IHeadlessB2BMagicLinksClient;

rbac: IHeadlessB2BRBACClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a member or session object being updated.
*
* This is an alternative to more specific methods like `self.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `self.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<B2BState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -37,0 +52,0 @@ }

@@ -1,2 +0,3 @@

import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, IHeadlessB2BPasswordClient } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, B2BState, IHeadlessB2BPasswordClient } from "@stytch/core/public";
/**

@@ -19,2 +20,3 @@ * A headless client used for invoking Stytch's B2B APIs.

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -35,2 +37,15 @@ magicLinks: IHeadlessB2BMagicLinksClient;

rbac: IHeadlessB2BRBACClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a member or session object being updated.
*
* This is an alternative to more specific methods like `self.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `self.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<B2BState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -37,0 +52,0 @@ }

@@ -1,2 +0,3 @@

import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, IHeadlessB2BPasswordClient } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { IHeadlessB2BDiscoveryClient, IHeadlessB2BMagicLinksClient, IHeadlessB2BMemberClient, IHeadlessB2BSelfClient, IHeadlessB2BOAuthClient, IHeadlessB2BOrganizationClient, IHeadlessB2BOTPsClient, IHeadlessB2BTOTPsClient, IHeadlessB2BSessionClient, IHeadlessB2BSSOClient, IHeadlessB2BRecoveryCodesClient, IHeadlessB2BRBACClient, StytchClientOptions, B2BState, IHeadlessB2BPasswordClient } from "@stytch/core/public";
/**

@@ -19,2 +20,3 @@ * A headless client used for invoking Stytch's B2B APIs.

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -35,2 +37,15 @@ magicLinks: IHeadlessB2BMagicLinksClient;

rbac: IHeadlessB2BRBACClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a member or session object being updated.
*
* This is an alternative to more specific methods like `self.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `self.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<B2BState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -37,0 +52,0 @@ }

@@ -1,2 +0,3 @@

import { IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient, Callbacks, StytchLoginConfig, StyleConfig } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { ConsumerState, IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient, Callbacks, StytchLoginConfig, StyleConfig } from "@stytch/core/public";
import { PromptMomentNotification } from "google-one-tap";

@@ -76,2 +77,3 @@ type OneTapNotShownReason = ReturnType<PromptMomentNotification["getNotDisplayedReason"]> | ReturnType<PromptMomentNotification["getSkippedReason"]>;

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -87,2 +89,15 @@ user: IHeadlessUserClient;

passwords: IHeadlessPasswordClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a user or session object being updated.
*
* This is an alternative to more specific methods like `user.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `user.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<ConsumerState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -89,0 +104,0 @@ }

@@ -1,2 +0,3 @@

import { IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient, Callbacks, StytchLoginConfig, StyleConfig } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { ConsumerState, IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient, Callbacks, StytchLoginConfig, StyleConfig } from "@stytch/core/public";
import { PromptMomentNotification } from "google-one-tap";

@@ -76,2 +77,3 @@ type OneTapNotShownReason = ReturnType<PromptMomentNotification["getNotDisplayedReason"]> | ReturnType<PromptMomentNotification["getSkippedReason"]>;

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -87,2 +89,15 @@ user: IHeadlessUserClient;

passwords: IHeadlessPasswordClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a user or session object being updated.
*
* This is an alternative to more specific methods like `user.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `user.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<ConsumerState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -89,0 +104,0 @@ }

@@ -1,2 +0,3 @@

import { IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { ConsumerState, IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient } from "@stytch/core/public";
import { PromptMomentNotification } from "google-one-tap";

@@ -76,2 +77,3 @@ type OneTapNotShownReason = ReturnType<PromptMomentNotification["getNotDisplayedReason"]> | ReturnType<PromptMomentNotification["getSkippedReason"]>;

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -87,2 +89,15 @@ user: IHeadlessUserClient;

passwords: IHeadlessPasswordClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a user or session object being updated.
*
* This is an alternative to more specific methods like `user.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `user.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<ConsumerState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -89,0 +104,0 @@ }

@@ -1,2 +0,3 @@

import { IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient } from "@stytch/core/public";
import { StateChangeRegisterFunction } from "@stytch/core";
import { ConsumerState, IHeadlessCryptoWalletClient, IHeadlessMagicLinksClient, IHeadlessOTPsClient, IHeadlessPasswordClient, IHeadlessSessionClient, IHeadlessTOTPClient, IHeadlessUserClient, IHeadlessWebAuthnClient, StytchClientOptions, IHeadlessOAuthClient } from "@stytch/core/public";
import { PromptMomentNotification } from "google-one-tap";

@@ -76,2 +77,3 @@ type OneTapNotShownReason = ReturnType<PromptMomentNotification["getNotDisplayedReason"]> | ReturnType<PromptMomentNotification["getSkippedReason"]>;

private readonly _dataLayer;
private readonly _stateChangeClient;
// External API Clients

@@ -87,2 +89,15 @@ user: IHeadlessUserClient;

passwords: IHeadlessPasswordClient;
// External methods
/**
* Register a callback function to be invoked whenever certain state changes
* occur, like a user or session object being updated.
*
* This is an alternative to more specific methods like `user.onChange` and
* `session.onChange`. It can be helpful if you want to be notified of related
* changes to different parts of state at once.
*
* If you are only interested in specific state changes, consider using more
* specific methods like `user.onChange` and `session.onChange` instead.
*/
onStateChange: StateChangeRegisterFunction<ConsumerState>;
constructor(_PUBLIC_TOKEN: string, options?: StytchClientOptions);

@@ -89,0 +104,0 @@ }

5

package.json
{
"name": "@stytch/vanilla-js",
"version": "4.8.0",
"version": "4.9.0",
"description": "Stytch's official Javascript Client Library",

@@ -40,3 +40,3 @@ "main": "./dist/index.js",

"dependencies": {
"@stytch/core": "2.12.0",
"@stytch/core": "2.13.0",
"@types/google-one-tap": "^1.2.0"

@@ -68,2 +68,3 @@ },

"@storybook/test-runner": "0.16.0",
"@stytch/js-utils": "0.0.0",
"@testing-library/react": "12.1.3",

@@ -70,0 +71,0 @@ "@testing-library/user-event": "14.2.1",

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

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

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

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

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

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

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

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc