Skip to content

Commit 50f9c68

Browse files
committed
fix: do not hit session endpoint in ssr
1 parent ae6af87 commit 50f9c68

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

app/composables/useAtproto.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import type { UserSession } from '#shared/schemas/userSession'
22

33
export function useAtproto() {
4+
if (import.meta.server) {
5+
return {
6+
user: ref(null),
7+
pending: ref(false),
8+
logout: async () => {},
9+
}
10+
}
11+
412
const { data: user, pending, clear } = useFetch<UserSession | null>('/api/auth/session')
513

614
async function logout() {

0 commit comments

Comments
 (0)