Files
afilmory/be/apps/dashboard/src/modules/auth/api/session.ts
Innei 89f2825a1b feat(auth): implement social authentication support and refactor related components
- Added social authentication buttons to the registration and login flows.
- Updated API endpoints for tenant registration and session management.
- Refactored authentication client to unify global and tenant authentication handling.
- Removed deprecated tenant authentication module and related configurations.
- Enhanced onboarding and settings UI to accommodate new social provider configurations.

Signed-off-by: Innei <tukon479@gmail.com>
2025-11-07 02:16:00 +08:00

16 lines
409 B
TypeScript

import { coreApi } from '~/lib/api-client'
import type { BetterAuthSession, BetterAuthUser } from '../types'
export type SessionResponse = {
user: BetterAuthUser
session: BetterAuthSession
}
export const AUTH_SESSION_QUERY_KEY = ['auth', 'session'] as const
export async function fetchSession() {
const session = await coreApi<SessionResponse>('/auth/session', { method: 'GET' })
return session
}