Skip to content

Commit

Permalink
format: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinaldy Rafli committed Jul 4, 2021
1 parent 6b88594 commit 0dd8581
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export function csrf(opts: CSRFOptions = {}) {
let token: string

req.csrfToken = (): string => {
const newSecret = !options.cookie ? getSecret(req, options.sessionKey, options.cookie, options.middleware) : secret
const newSecret = !options.cookie
? getSecret(req, options.sessionKey, options.cookie, options.middleware)
: secret

token = tokens.create(newSecret)
return token
Expand Down

0 comments on commit 0dd8581

Please sign in to comment.