mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-25 01:15:26 +10:00
fix auth error: "name is required" (#2668)
This commit is contained in:
@@ -120,10 +120,6 @@ const getAuthConfig = () => {
|
||||
},
|
||||
},
|
||||
additionalFields: {
|
||||
name: {
|
||||
type: "string",
|
||||
required: true,
|
||||
},
|
||||
username: {
|
||||
type: "string",
|
||||
required: true,
|
||||
|
||||
@@ -12,5 +12,5 @@ export const getSession = createIsomorphicFn()
|
||||
})
|
||||
.server(async (): Promise<AuthSession | null> => {
|
||||
const result = await auth.api.getSession({ headers: getRequestHeaders() });
|
||||
return result;
|
||||
return result as AuthSession | null;
|
||||
});
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import z from "zod";
|
||||
import type { auth } from "./config";
|
||||
|
||||
export type AuthSession = typeof auth.$Infer.Session;
|
||||
export type AuthSession = {
|
||||
session: typeof auth.$Infer.Session.session;
|
||||
user: typeof auth.$Infer.Session.user & {
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
|
||||
const authProviderSchema = z.enum(["credential", "google", "github", "custom"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user