diff --git a/client/package.json b/client/package.json index 108d98d..d9e6c0a 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "authpal-client", - "version": "1.5.02", + "version": "1.5.3", "description": "An authentication and authorization library for express applications and clients", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/package.json b/package.json index 9c0c380..d9ddb7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "authpal", - "version": "1.5.02", + "version": "1.5.3", "description": "An authentication and authorization library for express applications and clients", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/server/server.ts b/src/server/server.ts index be4f7b5..8150699 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -243,8 +243,10 @@ export class Authpal { })(req, res, next) } - this.verifyAuthToken = async (authToken) => { - return new Promise((resolve, reject) => { + this.verifyAuthToken = async ( + authToken + ): Promise<{ userid: string } | null> => { + return new Promise<{ userid: string } | null>((resolve, reject) => { passport.authenticate('jwt', { session: false }, (err, jwtPayload) => { if (err || !jwtPayload) { reject() @@ -323,7 +325,9 @@ export class Authpal { next: NextFunction ) => {} - verifyAuthToken = async (authToken: string) => {} + verifyAuthToken = async ( + authToken: string + ): Promise<{ userid: string } | null> => null logoutMiddleware = (req: Request, res: Response, next: NextFunction) => {} }