Skip to content

Commit

Permalink
make req.auth optional in the ExpressJwtRequest type
Browse files Browse the repository at this point in the history
  • Loading branch information
jfromaniello committed Apr 27, 2022
1 parent 727b57d commit 496fda4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Params = {
export { UnauthorizedError } from './errors/UnauthorizedError';

export type ExpressJwtRequest<T = jwt.JwtPayload> =
express.Request & { auth: T }
express.Request & { auth?: T }


export const expressjwt = (options: Params) => {
Expand Down

0 comments on commit 496fda4

Please sign in to comment.