mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-09 13:06:45 +03:00
some more fixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createAuthClient } from "better-auth/react";
|
||||
import { oidcClient } from "better-auth/client/plugins";
|
||||
import { ssoClient } from "better-auth/client/plugins";
|
||||
import type { Session as BetterAuthSession, User as BetterAuthUser } from "better-auth";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
// The base URL is optional when running on the same domain
|
||||
@@ -23,6 +24,12 @@ export const {
|
||||
getSession
|
||||
} = authClient;
|
||||
|
||||
// Export types
|
||||
export type Session = Awaited<ReturnType<typeof authClient.getSession>>["data"];
|
||||
export type AuthUser = Session extends { user: infer U } ? U : never;
|
||||
// Export types - directly use the types from better-auth
|
||||
export type Session = BetterAuthSession & {
|
||||
user: BetterAuthUser & {
|
||||
username?: string | null;
|
||||
};
|
||||
};
|
||||
export type AuthUser = BetterAuthUser & {
|
||||
username?: string | null;
|
||||
};
|
||||
Reference in New Issue
Block a user