
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
svelte-session-manager
Advanced tools
Session store for svelte (currently only for JWT)
import { derived } from 'svelte';
import { Session, login } from 'svelte-session-manager';
// use localStorage as backing store
let session = new Session(localStorage);
// session may still be valid
if(!session.isValid) {
await login(session, 'https://mydomain.com/authenticate', 'a user', 'a secret');
}
session.isValid; // true when auth was ok or localStorage token is still valid
export const values = derived(
session,
($session, set) => {
if (!session.isValid) {
set([]); // session has expired no more data
} else {
fetch('https://mydomain.com/values', {
headers: {
...session.authorizationHeader
}
}).then(async data => set(await data.json()));
}
return () => {};
}
,[]);
// $values contains fetch result as long as session has not expired
export BROWSER=safari|chrome|...
npm|yarn test
The test runs the following requests against the server
curl -X POST -d '{"username":"user","password":"secret"}' 'http://[::]:5000/api/login'
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbnRpdGxlbWVudHMiOiJhLGIsYyIsImlhdCI6MTYwNDY2NDI0NywiZXhwIjoxNjA0NjY0MjYyfQ.qyjeoCuXO0iyYwSxM2sM02_BVhaZobRmEWam1M8Hzkx51nbsAuTR8G1rNgz1COo_KvbCU7LwZt7qnSEFB1tcwyDA1eBxwc2Wb7JxWgQ50m1IWkr2JCgY1seWRJRcwZBXiTRtiPqhzofP-l3S-CBluzU48cd4yzoPayczLkKuPK4"}
curl -X POST -d '{"username":"user","password":"wrong"}' 'http://[::]:5000/api/login'
{"message":"Unauthorized"}
Bring session into the valid state by calling the authorization endpoint and asking for a access_token. Executes a POST on the endpoint url expecting username, and password as json
session
Session to be openedendpoint
string authorization urlusername
string id of the userpassword
string user credentialstokenmap
object token names in response to internal known values (optional, default {access_token:"access_token",refresh_token:"refresh_token"}
)Returns string error message in case of failure or undefined on success
Extract error description from response
response
FetchResponseReturns string
Data as preserved in the backing store
Type: Object
User session To create as session backed by browser local storage
let session = new Session(localStorage);
or by browser session storage
let session = new Session(sessionStorage);
data
SessionDataentitlements
Set<string>subscriptions
Set<Object> store subscriptionsexpirationDate
Date when the access token expiresaccess_token
string token itselfrefresh_token
string refresh tokenrefreshDate
Date when the refresh token expiresstore
SessionData backing store to use for save same as data paramInvalidate session data.
Refresh with refresh_token
Persist into the backing store.
Http header suitable for fetch.
Returns Object header The http header.
Returns string header.Authorization The Bearer access token.
As long as the expirationTimer is running we must be valid.
Returns boolean true if session is valid (not expired)
Remove all tokens from the session and the backing store.
Check presence of an entitlement.
name
string of the entitlementReturns boolean true if the named entitlement is present
Fired when the session changes.
subscription
FunctionWith npm do:
npm install svelte-session-manager
BSD-2-Clause
FAQs
Session store for svelte (currently only for JWT)
The npm package svelte-session-manager receives a total of 329 weekly downloads. As such, svelte-session-manager popularity was classified as not popular.
We found that svelte-session-manager demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.