Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
trusted-accounts-sdk-node
Advanced tools
The Trusted Accounts Node SDK allows you to integrate user verification and validation into your Node.js application with minimal setup. It supports the OIDC flow, dynamic redirects, and session management.
npm install --save trusted-accounts-sdk-node
Get your platform credentials by creating a free developer account here: developer console.
import TrustedAccountsSDK from 'trusted-accounts-sdk-node';
const taClient = new TrustedAccountsSDK({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
redirectUri: 'YOUR_REDIRECT_URL'
});
import TrustedAccountsClient from 'trusted-accounts-sdk-node';
app.get('/start-verification', async (req, res) => {
const trustedClient = new TrustedAccountsClient(
"CLIENT_ID", // Your Client ID
"REDIRECT_URL" // Your Redirect URI
);
// Generate the verification URL
const verificationUrl = await trustedClient.generateVerificationLink(
'foo@bar.com', // The email of the user you want to validate
);
// Redirect the user to the verification page
// or create a verification button to trigger it manually
res.redirect(verificationUrl);
});
app.get('/callback', async (req, res) => {
const trustedCallback = await taClient.handleCallback(req.originalUrl);
res.send(`Verification completed! Trusted ID: ${trustedCallback.trustedId}`);
});
app.get('/user', async (req, res) => {
const user = await taClient.getUser('USER_TRUSTED_ID');
res.json(user);
});
That's it! You have successfully integrated Trusted Accounts on your platform! 🖖 Try validate yourself and then go to the user list in the developer console to find the newly validated user.
FAQs
A simple SDK for Trusted Accounts for NodeJS
The npm package trusted-accounts-sdk-node receives a total of 528 weekly downloads. As such, trusted-accounts-sdk-node popularity was classified as not popular.
We found that trusted-accounts-sdk-node 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
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.