
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
react-native-opentok
Advanced tools
npm install react-native-opentok --save
rnpm link react-native-opentok
pod 'OpenTok'
pod install
###SAMPLE USAGE###
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import OpenTok from 'react-native-opentok'
//URL to connect to session
var sampleServerBaseUrl = 'https://calm-ridge-14798.herokuapp.com',
sessionCredentialsUrl = sampleServerBaseUrl + '/session',
startArchiveUrl = sampleServerBaseUrl + '/start/',
stopArchiveUrl = sampleServerBaseUrl + '/stop/';
const TestView = React.createClass ({
getInitialState() {
return ({
apiKey: null,
sessionId: null,
token: null,
doConnect: false
});
},
componentWillMount() {
//To start the OpenTok session, call this function
this.getApiKeyAndToken();
},
getApiKeyAndToken() {
var xhr = new XMLHttpRequest();
xhr.open("GET", sessionCredentialsUrl, true);
var self = this;
xhr.onload = function (e) {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
openTokSessionInfo = JSON.parse(xhr.responseText);
self.setState({
apiKey: openTokSessionInfo.apiKey,
sessionId: openTokSessionInfo.sessionId,
token: openTokSessionInfo.token
doConnect: true
});
} else {
console.log(xhr.statusText);
}
}
};
xhr.onerror = function (e) {
console.log(xhr.statusText);
};
xhr.send(null);
},
didDisconnect() {
//Callback function
},
render() {
return (
<View style={styles.container}>
<OpenTok doConnect={this.state.doConnect} apiKey={this.state.apiKey} sessionId={this.state.sessionId} token={this.state.token}/>
</View>
);
}
});
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
}
});
AppRegistry.registerComponent('test', () => TestView);
FAQs
React Native OpenTok
The npm package react-native-opentok receives a total of 2 weekly downloads. As such, react-native-opentok popularity was classified as not popular.
We found that react-native-opentok 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.