Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
eltharynd committed Feb 8, 2024
1 parent 4b0618c commit 18dca37
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
10 changes: 7 additions & 3 deletions src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ export class Authpal<T extends AuthpalJWTPayload = AuthpalJWTPayload> {
})(req, res, next)
}

this.verifyAuthToken = async (authToken) => {
return new Promise<void>((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()
Expand Down Expand Up @@ -323,7 +325,9 @@ export class Authpal<T extends AuthpalJWTPayload = AuthpalJWTPayload> {
next: NextFunction
) => {}

verifyAuthToken = async (authToken: string) => {}
verifyAuthToken = async (
authToken: string
): Promise<{ userid: string } | null> => null

logoutMiddleware = (req: Request, res: Response, next: NextFunction) => {}
}

0 comments on commit 18dca37

Please sign in to comment.