Skip to content
Merged
Prev Previous commit
Next Next commit
Update callback types
  • Loading branch information
adam-maj committed Aug 31, 2022
commit b388e0682c7e56e25e6ce00795e96de5d681a8e4
2 changes: 1 addition & 1 deletion packages/auth/src/express/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function ThirdwebAuth(app: Express, cfg: ThirdwebAuthConfig) {
}
}

req.user = user;
req.user = user as ThirdwebAuthUser | null;
next();
});

Expand Down
4 changes: 2 additions & 2 deletions packages/auth/src/next/routes/user.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ThirdwebAuthContext } from "../types";
import { ThirdwebAuthContext, ThirdwebAuthUser } from "../types";
import { NextApiRequest, NextApiResponse } from "next";

export default async function handler(
Expand Down Expand Up @@ -30,5 +30,5 @@ export default async function handler(
}
}

return res.status(200).json(user);
return res.status(200).json(user as ThirdwebAuthUser | null);
}