Sthap
Sthap
BABetter Auth
Created by Sthap on 2/28/2025 in #help
issue with better auth base url configuration
No description
6 replies
BABetter Auth
Created by Sthap on 2/28/2025 in #help
issue with better auth base url configuration
No description
6 replies
BABetter Auth
Created by Sthap on 2/28/2025 in #help
issue with better auth base url configuration
error from sevalla logs: [better-call]: Make sure the URL has the basePath (/https://seat-reseeee-ftkln.kinsta.app).
6 replies
BABetter Auth
Created by Sthap on 2/28/2025 in #help
issue with better auth base url configuration
No description
6 replies
BABetter Auth
Created by Sthap on 2/28/2025 in #help
issue with better auth base url configuration
No description
6 replies
BABetter Auth
Created by Sthap on 2/25/2025 in #help
Missing field in session object with drizzle adapter
I really appreciate it , thanks a lot!
12 replies
BABetter Auth
Created by Sthap on 2/25/2025 in #help
Missing field in session object with drizzle adapter
It's my bad ;((
12 replies
BABetter Auth
Created by Sthap on 2/25/2025 in #help
Missing field in session object with drizzle adapter
Oh yes you are right!
12 replies
BABetter Auth
Created by Sthap on 2/25/2025 in #help
Missing field in session object with drizzle adapter
The error code state {"message":"Failed to get session","code":"FAILED_TO_GET_SESSION"} from /get-session
12 replies
BABetter Auth
Created by Sthap on 2/25/2025 in #help
Missing field in session object with drizzle adapter
my auth client code:
export const authClient = createAuthClient({
plugins: [
usernameClient(),
inferAdditionalFields<typeof auth>(),
],
baseURL: "http://localhost:3000",
})
export type Session = typeof authClient.$Infer.Session;
export const { signIn, signOut, signUp, useSession } = authClient;
export const authClient = createAuthClient({
plugins: [
usernameClient(),
inferAdditionalFields<typeof auth>(),
],
baseURL: "http://localhost:3000",
})
export type Session = typeof authClient.$Infer.Session;
export const { signIn, signOut, signUp, useSession } = authClient;
my server auth config:
export const auth = betterAuth({
secret: process.env.SECRET!,
database: drizzleAdapter(db, {
provider: "pg",
schema: {
additionalFields: {
isAdmin: {
type: "boolean",
required: true,
defaultValue: false,
input: false
},
},
verification,
session,
account,
},
}),
emailAndPassword: {
enabled: true,
requireEmailVerification: false,
},
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID! as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET! as string,
},
},
plugins: [username()],
})
export const auth = betterAuth({
secret: process.env.SECRET!,
database: drizzleAdapter(db, {
provider: "pg",
schema: {
additionalFields: {
isAdmin: {
type: "boolean",
required: true,
defaultValue: false,
input: false
},
},
verification,
session,
account,
},
}),
emailAndPassword: {
enabled: true,
requireEmailVerification: false,
},
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID! as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET! as string,
},
},
plugins: [username()],
})
12 replies
BABetter Auth
Created by Sthap on 2/25/2025 in #help
Missing field in session object with drizzle adapter
No description
12 replies