@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'
crypto({ symetricEncryptionKey: '_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 to accounts
Database table
id
sub
encryptionKey
publicKey
privateKey
create
update
- Any additional columns