mirror of
https://github.com/Afilmory/afilmory
synced 2026-02-01 22:48:17 +00:00
- 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>
16 lines
409 B
TypeScript
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
|
|
}
|