
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
@livechat/accounts-sdk
Advanced tools
accountsSDK is a small library that installs the "Sign in with LiveChat" button on any website or app. It also wraps OAuth flow in an easy-to-use API.
npm install --save @livechat/accounts-sdk
Example sign in with LiveChat button designs. Assets are available here.
import AccountsSDK from '@livechat/accounts-sdk';
// create new SDK instance with it's options
const sdk = new AccountsSDK({
client_id: '<your_app_client_id>'
});
document.getElementById('login-button').onclick = (e) => {
if (e && e.preventDefault) {
e.preventDefault();
}
sdk.popup().authorize().then((authorizeData)=>{
const transaction = sdk.verify(authorizeData);
if (transaction != null) {
// authorization success
// authorizeData contains `accessToken` or `code`
// transation contains state and optional code_verifier (code + PKCE)
}
}).catch((e)=>{
})
};
Authorize using a popup. It's possible to pass options to override constructor options.
const sdk = new AccountsSDK(options)
const promise = sdk.popup(options).authorize()
Authorize using iframe. It's possible to pass options to override constructor options. Works when a browser doesn't check for ITP, and user authentication is set.
const sdk = new AccountsSDK(options)
const promise = sdk.iframe(options).authorize()
Authorize using a full redirect. Authorize function performs full browser redirect to an authorization server. authorizeData function checks if authorization is set in URL.
const sdk = new AccountsSDK(options)
sdk.redirect().authorizeData().then((authorizeData)=>{
// authorize data found in URL
const transaction = sdk.verify(authorizeData);
}).catch((e)=>{
// authorize data missing, redirect to authorization server
sdk.redirect().authorize()
})
client_id string required registered client IDorganization_id string organization IDprompt string use consent to force consent prompt in a popup and redirect flowsresponse_type='token' string OAuth response type, use token or codepopup_flow='auto' string auto - don't show popup when credentials are not required, manual - always show popupstate string OAuth state param, auto generated by SDK when emptyverify_state=true bool a function that returns transaction should verify if the state matchesscope string - custom scope list, must be a subset of preconfigured client ID scopesredirect_uri string OAuth redirect URI - current location by defaultemail_hint string fill in an email hint in formsserver_url='https://accounts.livechat.com' string authorization server urlpath='' string option to provide a path when loading accounts, for example /signuptracking object tracking querystring paramstransaction.namespace='com.livechat.accounts' string transaction keys prefixtransaction.key_length=32 number transaction random state lengthtransaction.force_local_storage=false bool try to use local storage instead of cookiespkce.enabled=true bool Oauth 2.1 PKCE extension enabled for code grantpkce.code_verifier string override auto generated code verifierpkce.code_verifier_length=128 number code verifier length, between 43 and 128 characters https://tools.ietf.org/html/rfc7636#section-4.1pkce.code_challenge_method='S256' string code challenge method, use S256 or plainpkce.code_challange_method string Deprecated. Use code_challenge_method instead. Will be removed in v3.0.0.See CHANGELOG.md for release history.
See CONTRIBUTING.md.
FAQs
SDK for 'Sign in with LiveChat'.
The npm package @livechat/accounts-sdk receives a total of 1,729 weekly downloads. As such, @livechat/accounts-sdk popularity was classified as popular.
We found that @livechat/accounts-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.