Skip to content

triauth-js

The official JavaScript client library.

Language
JavaScript and TypeScript
Install
npm install triauth
License
Apache-2.0

Get started

triauth-js is the reference, open-source implementation of the triauth protocol for JavaScript and TypeScript. It has zero runtime dependencies, runs in Node.js 18+ and in modern browsers, and ships as a dual ES module / CommonJS package with type definitions.

Install ​

From npm:

shell
npm install triauth

Or straight into a web page:

html
<script src="https://cdn.jsdelivr.net/npm/triauth@latest/dist/triauth.js" crossorigin="anonymous"></script>
<!-- For maximum privacy, self-host the file above instead of loading it from a public CDN. -->

What you can do with it

🔓 Sign in (authenticate)

Get a cryptographic proof that the user is in control of the identifier (e.g., john@example.com) and may be signed in with it.

🔒 Sign out (check, ping)

Confirm that the user may remain signed in by checking that their keys were not revoked (check), or by obtaining a fresh cryptographic proof of identity and key possession (ping).

✍️ Sign (sign)

Ask the user to review and sign your ToS or any message, with optional file attachments, and get back a transferable signature you can store, forward to a third party, or check yourself with verify.

🏅 Attest (attest)

Collect third-party attestations about the user, such as "I am not a robot" or "I am over 18", each signed by a verification provider that you trust.

🔖 Stamp (stamp)

Obtain a silent background signature over a short message, to prove to any third party that the user is signed in with you.

🔎 Look up & verify (whois, verify, validate)

Read any identifier's public profile, devices, and keys (whois); verify any triauth signature or stamp on its own (verify); or pre-check an identifier's format with no DNS lookup (validate).

The README on GitHub has the complete API reference, runnable examples, and the security considerations to read before you deploy.

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.