Skip to content

Commit

Permalink
Update customization doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mw10013 committed Dec 24, 2023
1 parent 7bc4e0e commit 06c8bb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ For this example we'll use Prisma ORM with a SQLite database. As long as your da

```ts
/**
* Required Fields:
* Fields:
* - `hash`: String
* - `active`: Boolean, default: true
* - `attempts`: Int (Number), default: 0
*
* Optional Fields:
* - `expiresAt`: DateTime (Date)
*/
model Totp {
Expand Down
10 changes: 8 additions & 2 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface TOTPGenerationOptions {
}

authenticator.use(
new OTPStrategy({
new TOTPStrategy({
codeGeneration: {
digits: 6,
period: 60,
Expand Down Expand Up @@ -124,7 +124,7 @@ export interface CustomErrorsOptions {
}

authenticator.use(
new OTPStrategy({
new TOTPStrategy({
customErrors: {
requiredEmail: 'Whoops, email is required.',
},
Expand Down Expand Up @@ -167,6 +167,12 @@ export interface TOTPStrategyOptions<User> {
* @default "auth:totp"
*/
sessionTotpKey?: string
/**
* The session key that stores the expiration of the TOTP.
* @default "auth:totpExpiresAt"
*/
sessionTotpExpiresAtKey?: string

}
```

Expand Down

0 comments on commit 06c8bb2

Please sign in to comment.