@trustcore/auth
v0.1.2
Published
Authentication SDK for TrustCore and Sigcore integrations
Readme
@trustcore/auth
Authentication SDK for TrustCore and Sigcore integrations.
Install
npm install @trustcore/authUse with Sigcore
import { createHostedAuthClient } from '@trustcore/auth';
import { loadSigcore } from '@sigcore/sdk';
const auth = createHostedAuthClient({
sessionUrl: '/auth/sdk/session',
startUrl: '/auth/sdk/start',
logoutUrl: '/auth/sdk/logout',
});
const sigcore = await loadSigcore(yourPublishableKey, { auth });
// Call from a user action.
await sigcore.client.signIn();Requires a registered organization and configured authentication routes on your website's backend. Hosted authentication must be enabled for your integration. This version has not been qualified for production authentication.
Server integration
@trustcore/auth/server provides the backend adapter for Node.js 22+.
Keep private keys and secrets on the server. Production deployments require a
shared state store implementing the supplied types; the memory store is for
single-process development only. Use your provisioned integration settings.
License
MIT
