aa55h
aa55h
Explore posts from servers
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
Okay this is great
18 replies
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
@Lionel if you manage to find a solution, i will gladly take it
18 replies
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
schema: {
user,
session,
account,
verification,
},
}),
onAPIError: {
throw: true,
errorURL: "/error",
},
databaseHooks: {
session: {
create: {
after: async (session, context) => {
logger.info(`User ${session.userId} signed in`);
},
},
},
user: {
create: {
after: async (user, context) => {
logger.info(`User ${user.id} signed up`);
},
},
},
},
plugins: [
nextCookies(),
captcha({
provider: "cloudflare-turnstile",
secretKey: process.env.CAPTCHA_SECRET_KEY as string,
endpoints: ["/sign-in/email", "/sign-up"]
}),
],
emailAndPassword: {
enabled: true,
minPasswordLength: 8,
maxPasswordLength: 40,
},
socialProviders: {
github: {
enabled: true,
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
},
google: {
enabled: true,
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
},
},
});
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
schema: {
user,
session,
account,
verification,
},
}),
onAPIError: {
throw: true,
errorURL: "/error",
},
databaseHooks: {
session: {
create: {
after: async (session, context) => {
logger.info(`User ${session.userId} signed in`);
},
},
},
user: {
create: {
after: async (user, context) => {
logger.info(`User ${user.id} signed up`);
},
},
},
},
plugins: [
nextCookies(),
captcha({
provider: "cloudflare-turnstile",
secretKey: process.env.CAPTCHA_SECRET_KEY as string,
endpoints: ["/sign-in/email", "/sign-up"]
}),
],
emailAndPassword: {
enabled: true,
minPasswordLength: 8,
maxPasswordLength: 40,
},
socialProviders: {
github: {
enabled: true,
clientId: process.env.GITHUB_CLIENT_ID as string,
clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
},
google: {
enabled: true,
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
},
},
});
this is mine
18 replies
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
No description
18 replies
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
oh so its for api endpoints and not actual pages? or do i not understand
18 replies
BABetter Auth
Created by aa55h on 3/28/2025 in #help
Better Auth errors with state not found after social sign in
Ill try to update the version, funny thing is that the user is actually signed in, so when i go to /home i can do stuff as auth user
4 replies
BABetter Auth
Created by aa55h on 3/24/2025 in #help
Social sign-in doesn't work
yes, fixed it
6 replies
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
well, but the social sign in button is on the same page as the email signin
18 replies
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
yes
18 replies
BABetter Auth
Created by aa55h on 3/24/2025 in #help
Social sign-in doesn't work
No description
6 replies
BABetter Auth
Created by aa55h on 3/23/2025 in #help
Not requiring captcha for social signins
bump?
18 replies
BABetter Auth
Created by aa55h on 3/4/2025 in #help
Model "user" was not found in the database schema object with drizzle
yes
15 replies
BABetter Auth
Created by aa55h on 3/4/2025 in #help
Model "user" was not found in the database schema object with drizzle
seems like
15 replies
BABetter Auth
Created by aa55h on 3/4/2025 in #help
Model "user" was not found in the database schema object with drizzle
oh nvm im stupid i was using wrong driver i guess?
15 replies
BABetter Auth
Created by aa55h on 3/4/2025 in #help
Model "user" was not found in the database schema object with drizzle
No description
15 replies
BABetter Auth
Created by aa55h on 3/4/2025 in #help
Model "user" was not found in the database schema object with drizzle
@preAGIcoder it seems like it could work, but can i pass the database url like this:
DATABASE_URL=postgres://postgres:[email protected]:5431/database
DATABASE_URL=postgres://postgres:[email protected]:5431/database
?
15 replies
BABetter Auth
Created by aa55h on 3/4/2025 in #help
Model "user" was not found in the database schema object with drizzle
Yes one sec
15 replies
BABetter Auth
Created by aa55h on 3/4/2025 in #help
Model "user" was not found in the database schema object with drizzle
sure
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
}),
emailAndPassword: {
enabled: true,
},
});
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg",
}),
emailAndPassword: {
enabled: true,
},
});
15 replies
PPrisma
Created by aa55h on 12/17/2024 in #help-and-questions
How to correctly deploy prisma into production?
Okay I know where the issue is now, I have declared postinstall script as well, which at that time, the environment variable was not yet set from the arg, therefore failing to migrate, I have now fixed it and its working :)
5 replies
CC#
Created by aa55h on 10/20/2024 in #help
Mono.Cecil TypeReference modifies TypeDefinition
awesome, it seems it was fixed, thanks
8 replies