Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 3f98a65

Browse files
committed
fix: no need for inertia.always
1 parent e2af983 commit 3f98a65

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

website/config/inertia.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ const inertiaConfig = defineConfig({
1818
*/
1919
sharedData: {
2020
environment: env.public(),
21-
auth: async ({ auth, inertia }) => {
22-
return inertia.always(async (): Promise<AuthenticationData> => {
23-
if (!auth.authenticationAttempted) await auth.check()
21+
auth: async ({ auth }): Promise<AuthenticationData> => {
22+
if (!auth.authenticationAttempted) await auth.check()
2423

25-
const user = auth.user
26-
if (!user) return { authenticated: false }
27-
return { authenticated: true, user: { email: user.email } }
28-
})
24+
const user = auth.user
25+
if (!user) return { authenticated: false }
26+
return { authenticated: true, user: { email: user.email } }
2927
},
3028
},
3129

0 commit comments

Comments
 (0)