0.0.10 • Published 4 years ago

@baseline-dev/fireplace v0.0.10

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

Getting started

npm install @baseline-dev/fireplace

Configuration

Make sure you set the following environment variables:

Environment variableRequiredExample
BASELINE_FIREPLACE_DYNAMODB_TABLENAMEyesBaseline
BASELINE_FIREPLACE_DYNAMODB_REGIONyesus-east-1
BASELINE_FIREPLACE_DYNAMODB_ENDPOINTnolocalhost

Api methods

Fireplace exports the following methods for you.

Method name
getAccount
getAccountByEmail
createAccount
deleteAccount
updateAccount
updatePassword
isValidPassword
requestEmailChange
updateEmailWithToken
requestPasswordReset
updatePasswordWithToken
setupAccountPassword

DynamoDB partition and sort keys.

The following partition and sort key schema is used.

pksk
#ACCOUNT{USERID}#ACCOUNT{USERID}
#EMAIL{EMAIL}#EMAIL{EMAIL}
#CHANGEEMAILREQUEST{HASH}#CHANGEEMAILREQUEST{HASH}
#CHANGEPASSWORDREQUEST{HASH}#CHANGEPASSWORDREQUEST{HASH}