@zalter/identity-js
v1.2.1
Published
A browser API client for Zalter Identity service
Downloads
733
Readme
Zalter Identity - Browser SDK
A browser side software developer kit meant to be used for the Zalter Identity Service offered by Zalter.
Installation
npm install @zalter/identity-js
Usage
import { Auth } from '@zalter/identity-js';
const auth = new Auth({
projectId: '<projectId>' // replace with your own projectId
});
await auth.signInWithCode('start', {
email: '[email protected]' // Email of the user you want to authenticate.
});
await auth.signInWithCode('finalize', {
code: '<code>' // Email of the user you want to authenticate.
});
const isAuthenticated = await auth.isAuthenticated();
const user = await auth.getCurrentUser();
// user.signMessage();