
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@apollosproject/data-connector-onesignal
Advanced tools
Provides a connector to OneSignal for updating user data in OneSignal. This package (at this time) does not send push notifications, but rather sets up users in OneSignal so push notifications can be sent to them via the Rest API or OneSignal dashboard.
@apollosproject/data-connector-onesignal
Provides a connector to OneSignal for updating user data in OneSignal. This package (at this time) does not send push notifications, but rather sets up users in OneSignal so push notifications can be sent to them via the Rest API or OneSignal dashboard.
None at this time. However, we do some special magic in the apollos-church-api
app to demonstrate how you can capture the OneSignal ID and save it in Rock. If you look in src/data/oneSignalWithRock
you can see the following example:
/* eslint-disable import/prefer-default-export */
export const resolver = {
Mutation: {
updateUserPushSettings: async (root, { input }, { dataSources }) => {
// register the changes w/ one signal
const returnValue = await dataSources.OneSignal.updatePushSettings(input);
// if the pushProviderUserId is changing, we need ot register the device with rock.
if (input.pushProviderUserId != null) {
await dataSources.PersonalDevice.addPersonalDevice({
pushId: input.pushProviderUserId,
});
}
// return the original return value (which is currentPerson)
return returnValue;
},
},
};
Here we are overriding the updateUserPushSettings
resolver defined in this module, capturing the return of this module's data source call (which updates a OneSignal user) and puts their PushId in Rock so Rock can send the user push notifications.
If using OneSignal with Rock, we recommend you copy the above code and use it in conjunction with the OneSignal communication module that NewSpring Church is developing.
In your src/data/index
,
import * as OneSignal from '@apollosproject/data-connector-onesignal';
...
const data = {
...
OneSignal,
...
}
Implementing this module requires you also follow the steps to add OneSignal to your client app. Start by implementing OneSignal as outlined in this documentation.
https://documentation.onesignal.com/docs/react-native-sdk-setup
Next, you should mimic the config we wrote which sends PlayerID's to our API once they are received OneSignal gets them from the client.
import { gql } from '@apollo/client';
import { Component } from 'react';
import OneSignal from 'react-native-onesignal';
import { client } from '../client';
const UPDATE_DEVICE_PUSH_ID = gql`
mutation updateDevicePushId($pushId: String!) {
updateDevicePushId(pushId: $pushId) @client
}
`;
export default class NotificationsInit extends Component {
componentDidMount() {
OneSignal.init(Config.ONE_SIGNAL_KEY, {
kOSSettingsKeyAutoPrompt: true,
});
OneSignal.addEventListener('ids', this.onIds);
OneSignal.configure();
}
...
componentWillUnmount() {
OneSignal.removeEventListener('ids');
}
onIds = (device) => {
client.mutate({
mutation: UPDATE_DEVICE_PUSH_ID,
variables: { pushId: device.userId },
});
};
...
}
FAQs
Provides a connector to OneSignal for updating user data in OneSignal. This package (at this time) does not send push notifications, but rather sets up users in OneSignal so push notifications can be sent to them via the Rest API or OneSignal dashboard.
The npm package @apollosproject/data-connector-onesignal receives a total of 67 weekly downloads. As such, @apollosproject/data-connector-onesignal popularity was classified as not popular.
We found that @apollosproject/data-connector-onesignal demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.