@fortressauth/electron-sdk
v0.1.12
Published
Electron client for FortressAuth with token-based authentication.
Downloads
161
Readme
@fortressauth/electron-sdk
Electron client for FortressAuth with token-based authentication.
Features
FortressAuthclass with subscribe/getState helpers- Token storage via
electron-store(overrideable) - Works with main or renderer processes that have access to fetch
Installation
npm install @fortressauth/electron-sdk
# or
pnpm add @fortressauth/electron-sdk
# or
yarn add @fortressauth/electron-sdkQuick Start
import { FortressAuth } from '@fortressauth/electron-sdk';
const auth = new FortressAuth({ baseUrl: 'http://localhost:3000' });
const unsubscribe = auth.subscribe((state) => {
console.log('user', state.user);
});
await auth.signIn('[email protected]', 'password123');License
MIT
