Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-session-dynamodb
Advanced tools
A session management component in React that uses dynamodb as the backend
A session management component in React that uses dynamodb as the backend.
This component is under active development. Expect frequent updates.
This component provides the session management functionality in the superflows architecture.
Authentication in superflows is token based. User signs in using email and otp. After successful sign in, a token is generated, stored in the dynamodb and returned to the client side, where it is then encrypted and stored in the local storage. As long as the token present in local storage is valid in dynamodb, the user stays logged in.
Job of this session management module is to check the validity of the client side token and to return the status as true or false. It does so, by polling the backend (dynamodb) continuously at a configurable time interval (default interval being 15 seconds).
npm install --save react-session-dynamodb
import React from 'react'
import { Session } from 'react-session-dynamodb'
import 'react-session-dynamodb/dist/index.css'
const App = () => {
function onSessionCheck(result) {
console.log('session check result', result);
}
return (
/*
interval: polling duration
onSessionCheck: callback function
awsRegion: aws region
awsSecret: aws secret
awsKey: aws access key
email: email address (from local storage)
token: token (from local storage)
*/
<Session
interval={15000}
onSessionCheck={onSessionCheck}
awsRegion="awsRegion"
awsSecret="awsSecret"
awsKey="awsKeyu"
email="hru************@**ail.com"
token="980c914d-6242-4aec-9b2c-c24b050519db"
/>
)
}
export default App
PASS src/index.test.js (13.854s)
-------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---|---|---|---|---|---|
All files | 89.19 | 81.82 | 90.91 | 88.24 | |
index.js | 95.65 | 85 | 100 | 95.24 | 33 |
services.js | 25 | 100 | 0 | 25 | 7,14,15 |
utils.js | 100 | 50 | 100 | 100 | 16 |
------------- | ---------- | ---------- | ---------- | ---------- | ------------------- |
Test Suites: 1 passed, 1 total | |||||
Tests: 4 passed, 4 total | |||||
Snapshots: 0 total | |||||
Time: 15.262s | |||||
Ran all test suites. |
MIT © superflows-dev
FAQs
A session management component in React that uses dynamodb as the backend
The npm package react-session-dynamodb receives a total of 1 weekly downloads. As such, react-session-dynamodb popularity was classified as not popular.
We found that react-session-dynamodb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.