Skip to content

Commit

Permalink
fix: token expiresIn
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed May 29, 2024
1 parent b20a2bc commit 7e354f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 1 addition & 3 deletions packages/backend/src/services/userService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ export class UserService {
sub: user.id,
},
ENV.JWT_SECRET,
{
expiresIn: ENV.TOKEN_LIFETIME,
},
{},
);
}

Expand Down
6 changes: 4 additions & 2 deletions packages/frontend/src/features/ReportList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ export const AllReports = () => {

const NoReport = () => {
return (
<Center flexDir="column" mt="66px" color="text-title-blue-france" fontSize="26px">
<Center flexDir="column" mt="66px" p="16px" color="text-title-blue-france" fontSize="26px">
<styled.div lineHeight="36px">Bienvenue !</styled.div>
<styled.div lineHeight="36px">Pour commencer, créez votre premier compte-rendu ci-dessus.</styled.div>
<styled.div textAlign="center" lineHeight="36px">
Pour commencer, créez votre premier compte-rendu ci-dessus.
</styled.div>
<styled.img src={welcomeImage} alt="Bienvenue" mt="46px" />
</Center>
);
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type { PropsWithChildren } from "react";
import { useIsLoggedIn, useLogout } from "../contexts/AuthContext";
import { Box, Flex } from "#styled-system/jsx";
import type { RouterOutputs } from "../api";
import { css, cx } from "#styled-system/css";

export const Route = createRootRouteWithContext<Partial<RouterOutputs<"/api/login">>>()({
beforeLoad: (ctx) => {
Expand Down Expand Up @@ -88,6 +89,11 @@ const Layout = ({ children }: PropsWithChildren) => {
},
]),
]}
renderSearchInput={({ className, ...props }) => {
console.log(props);

return <input className={cx(css({ hideFrom: "lg" }), className)} {...props} />;
}}
/>
<Box flex="1">{children}</Box>
{/* <TanStackRouterDevtools /> */}
Expand Down

0 comments on commit 7e354f6

Please sign in to comment.