@1auth/account
v0.0.0-alpha.45
Published
Downloads
886
Readme
@1auth/account
Getting started
auth.js
import * as notify from "@1auth/notify-console";
import * as store from "@1auth/store-memory";
import crypto from "@1auth/crypto";
import account from "@1auth/account";
export {
exists as accountExists,
create as accountCreate,
lookup as accountLookup,
update as accountUpdate,
remove as accountRemove
} from '@1auth/account'
// Initialize
crypto({ symmetricEncryptionKey: '_32B_APPLICATION_ENCRYPTION_KEY_' });
account({ store, notify });
import {accountUsernameCreate} from './auth.js'
const sub = await accountCreate()
Options
notify
[Required]: Notify modulestore
[Required]: Store moduleencryptedFields
: Fields that should be encrypted. Defaults to["privateKey"]
table
: database table name. Defaults toaccounts
Database table
id
sub
encryptionKey
publicKey
privateKey
create
update
- Any additional columns