Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@bigcommerce/app-sdk-js
Advanced tools
Changelog
1.0.0
Readme
The BigCommerce (BC) JS SDK is a simple javascript library used to manage apps in the control panel. BC's JS SDK includes functionality to prevent users from being logged out of the control panel while using an app. Additionally, BC's JS SDK includes out of the box support for handling logout requests.
git clone git@github.com:bigcommerce/app-sdk-js.git
cd app-sdk-js
npm install
npm link
cd ../sample-app-nodejs
sample-app-nodejsnpm link app-sdk-js
In its most basic form, the BigCommerce SDK is used to keep apps in sync with the control panel. This prevents users of an application from being logged out. To consume the SDK, it should be loaded at the top of an application; ideally, as part of the main index. This enables the SDK to properly communicate with the control panel by covering the entire application.
In your application's main index (or app) file, import the library:
import 'bigcommerce-app-sdk-js';
Next, initialize the SDK. This should be done in the first part of the application that has access to the window object. In React-based applications, including NextJS, this can be done inside of useEffect
or componentDidMount
(for class components).
window.bcAsyncInit = function() {
Bigcommerce.init({
onLogout: callback
});
}
Finally, to add an additional layer of security, an onLogout
callback can be passed. This callback will be hit if the user logs out of the control panel, including logging out from a separate tab. For example, the NextJS sample app calls an internal API which removes the user from the active session.
FAQs
BigCommerce App JavaScript SDK
The npm package @bigcommerce/app-sdk-js receives a total of 2 weekly downloads. As such, @bigcommerce/app-sdk-js popularity was classified as not popular.
We found that @bigcommerce/app-sdk-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.