![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
@azure/communication-common
Advanced tools
Readme
This package contains common code for Azure Communication Service libraries.
npm install @azure/communication-common
A CommunicationUserCredential
authenticates a user with Communication Services, such as Chat or Calling. It optionally provides an auto-refresh mechanism to ensure a continuously stable authentication state during communications.
It is up to you the developer to first create valid user tokens with the Azure Communication Administration library. Then you use these tokens to create a AzureCommunicationUserCredential
.
CommunicationUserCredential
is only the interface, please always use the AzureCommunicationUserCredential
constructor to create a credential and take advantage of the built-in refresh logic.
const userCredential = new AzureCommunicationUserCredential(
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjM2MDB9.adM-ddBZZlQ1WlN3pdPBOF5G4Wh9iZpxNP_fSvpF4cWs"
);
Here we assume that we have a function fetchTokenFromMyServerForUser
that makes a network request to retrieve a token string for a user. We pass it into the credential to fetch a token for Bob from our own server. Our server would use the Azure Communication Administration library to issue tokens.
const userCredential = new AzureCommunicationUserCredential({
tokenRefresher: async () => fetchTokenFromMyServerForUser("bob@contoso.com")
});
Setting refreshProactively
to true will call your tokenRefresher
function when the token is close to expiry.
const userCredential = new AzureCommunicationUserCredential({
tokenRefresher: async () => fetchTokenFromMyServerForUser("bob@contoso.com"),
refreshProactively: true
});
Passing initialToken
is an optional optimization to skip the first call to tokenRefresher
. You can use this to separate the boot from your application from subsequent token refresh cycles.
const userCredential = new AzureCommunicationUserCredential({
tokenRefresher: async () => fetchTokenFromMyServerForUser("bob@contoso.com"),
refreshProactively: true,
initialToken:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjM2MDB9.adM-ddBZZlQ1WlN3pdPBOF5G4Wh9iZpxNP_fSvpF4cWs"
});
If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.
FAQs
Unknown package
The npm package @azure/communication-common receives a total of 36,394 weekly downloads. As such, @azure/communication-common popularity was classified as popular.
We found that @azure/communication-common 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
Security News
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.