Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@onbeam/react
Advanced tools
You need to provide a JWT token to consume the API. You will be able to obtain this user-specific JWT token after your user has logged in on your application.
You need to provide a JWT token to consume the API. You will be able to obtain this user-specific JWT token after your user has logged in on your application.
Depending on your preferred storage solution, you will need to either pass a token
prop to the provider on the initial render, or use the setToken
handler returned from the useBeam()
hook.
'use client';
import { Game } from '../components/Game';
import { BeamConfig } from 'mc-account-api-react';
export default function App() {
return (
<BeamConfig token="">
<Game />
</BeamConfig>
);
}
'use client';
import { Game } from '../components/Game';
import { BeamConfig } from 'mc-account-api-react';
import AsyncStorage from '@react-native-async-storage/async-storage';
export default function App() {
const { setToken } = useBeam();
async function handleSetToken() {
const userToken = await AsyncStorage.getItem("your_token_key");
setToken(userToken)
}
return (
<button onClick={handleSetToken}>Set the token manually</button>
);
}
Once you completed either step 1 or 2, you'll be authorized to use the provided hooks as follows.
import { useEditProfile } from 'mc-account-api-react';
export const YourComponent = () => {
const { mutate } = useEditProfile();
return (
<button
onClick={() => mutate({
data: {
// Add your payload here
}
})}
type="button"
>
Chagne your profile
</button>
)
}
FAQs
You need to provide a JWT token to consume the API. You will be able to obtain this user-specific JWT token after your user has logged in on your application.
The npm package @onbeam/react receives a total of 0 weekly downloads. As such, @onbeam/react popularity was classified as not popular.
We found that @onbeam/react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.