
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@aserto/aserto-spa-js
Advanced tools
Loosely modeled after the Auth0 SPA SDK.
Using npm:
npm install @aserto/aserto-spa-js
Using yarn:
yarn add @aserto/aserto-spa-js
Create an AsertoClient
instance before rendering or initializing your application. You should only have one instance of the client.
You need a valid access token before you can instantiate the client. For
the next few examples, the accessToken
variable is assumed to contain a
valid access token.
To obtain one via Auth0 (for example), use code like this:
// get a valid access token, e.g. from Auth0 getTokenSilently()
import createAuth0Client from '@auth0/auth0-spa-js';
const auth0 = await createAuth0Cient(
domain: '<AUTH0_DOMAIN>',
client_id: '<AUTH0_CLIENT_ID>',
redirect_uri: '<MY_CALLBACK_URL>'
);
const accessToken = await auth0.getTokenSilently();
Create an AsertoClient
in the following way:
import createAsertoClient from '@aserto/aserto-spa-js';
const aserto = await createAsertoClient({
token: accessToken, // valid access token
endpoint: 'authzmap' // authz map endpoint, defaults to /authzmap
});
// or you can just instantiate the client on its own
import { AsertoClient } from '@aserto/aserto-spa-js';
const aserto = new AsertoClient({
token: accessToken,
endpoint: 'authzmap' // authz map endpoint, defaults to /authzmap
});
<button id="get-authz-map">Get AuthZ Map</button>
document.getElementById('get-authz-map').addEventListener('click', async () => {
const [authzMap, error] = await aserto.getAuthorizationMap();
if (error) {
console.error(error);
} else {
console.log(authzMap);
}
});
FAQs
Aserto single-page application JavaScript SDK
The npm package @aserto/aserto-spa-js receives a total of 0 weekly downloads. As such, @aserto/aserto-spa-js popularity was classified as not popular.
We found that @aserto/aserto-spa-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.