
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@awsless/cognito
Advanced tools
Super lightweight AWS Cognito client for both the browser & nodejs. Uses the native web crypto & BigInt features in the browser & we designed the API to be tree shakable to keep the package as small as possible.
GZip Size: ~12kB
npm install --save @awsless/cognito
# using yarn:
yarn add @awsless/cognito
# using pnpm:
pnpm install @awsless/cognito
Depending on your use case you might want to use one of the following stores.
MemoryStore - Mostly used for debugging and when you don't want to persist the login token.
LocalStore - Used to store the login token on the client only.
CookieStore - The CookieStore is useful in scenarios like SSR, when you need access to the login token on the client as well as on the server.
import { Client, LocalStore } from '@awsless/cognito'
const client = new Client({
clientId: 'CLIENT_ID',
userPoolId: 'USER_POOL_ID',
store: new LocalStore(),
})
import { signUp, confirmSignUp } from '@awsless/cognito'
await signUp(client, {
email: 'EMAIL',
username: 'USER',
password: 'PASS',
})
// Let the user fill in his confirmation code.
await confirmSignUp(client, {
username: 'USER',
code: 'SIGN_UP_CONFIRMATION_CODE',
})
const session = await signIn(client, {
username: 'USER',
password: 'PASS',
})
// Log logged in user.
console.log(session.user)
await signOut(client)
const session = await getSession(client)
// Log access token
console.log(session.accessToken.toString())
// Log ID token
console.log(session.idToken.toString())
await changePassword(client, {
previousPassword: 'PREV_PASS',
proposedPassword: 'NEW_PASS',
})
const response = await client.call('API_NAME', {
...
});
MIT
FAQs
Lightweight AWS Cognito client for the browser.
We found that @awsless/cognito demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.