A lightweight utility package for decentralized identity (DID) authentication.
Install the package using npm:
npm install did-authenticator
const { verifyDID } = require('did-authenticator');
const userDID = 'did:example:123456789';
const userSignature = '...'; // User's signature
const isValid = verifyDID(userDID, userSignature);
if (isValid) {
console.log('User authenticated successfully!');
} else {
console.error('Invalid authentication.');
}
Verifies the authenticity of a user based on their DID and provided signature.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.