Abhay Ramesh
Abhay Ramesh
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
Hey thanks alot for the help, really love better-auth nice work
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
even if im not importing import { auth } from "my-config" have the issue
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
ok i manually removed oneTap from /node_modules/better-auth/dist/client/plugins.js and it worked
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
Usage of "jose" might be the issue "Maybe"
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
packages/better-auth/src/plugins/one-tap/index.ts
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
v1.1.18 works v1.1.19-beta.1 works v1.1.19-beta.2 doesn't work v1.1.19-beta.3 doesn't work v1.1.19 doesn't work
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
ill try to test from v1.1.18 till v1.1.19 we might be able to narrow down to figure out which release caused it
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
No description
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
Yes ig btw its this file
import { expo } from "@better-auth/expo";
import { db } from "@workspace/database"; // your drizzle instance
import { resend } from "@workspace/email";
import { keys } from "@workspace/email/keys";
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { emailOTP, openAPI, username } from "better-auth/plugins";
import * as dotenv from "dotenv";

// Load environment variables
dotenv.config();

export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg", // or "mysql", "sqlite"
}),
user: {
additionalFields: {
role: {
type: "string",
required: true,
defaultValue: "participant",
input: false, // don't allow user to set role
},
},
},
plugins: [
username(),
expo(),
openAPI(),
emailOTP({
async sendVerificationOTP(data, request) {
try {
const { email, otp } = data;

await resend.emails.send({
from: keys().RESEND_FROM,
to: email,
subject: "Your Verification Code",
html: `
<div>hi</div>
`,
});
} catch (error) {
console.error("Failed to send email:", error);
throw new Error("Failed to send verification email");
}
},
}),
],
trustedOrigins: ["myapp://", "http://localhost:3000"],
});
import { expo } from "@better-auth/expo";
import { db } from "@workspace/database"; // your drizzle instance
import { resend } from "@workspace/email";
import { keys } from "@workspace/email/keys";
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { emailOTP, openAPI, username } from "better-auth/plugins";
import * as dotenv from "dotenv";

// Load environment variables
dotenv.config();

export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg", // or "mysql", "sqlite"
}),
user: {
additionalFields: {
role: {
type: "string",
required: true,
defaultValue: "participant",
input: false, // don't allow user to set role
},
},
},
plugins: [
username(),
expo(),
openAPI(),
emailOTP({
async sendVerificationOTP(data, request) {
try {
const { email, otp } = data;

await resend.emails.send({
from: keys().RESEND_FROM,
to: email,
subject: "Your Verification Code",
html: `
<div>hi</div>
`,
});
} catch (error) {
console.error("Failed to send email:", error);
throw new Error("Failed to send verification email");
}
},
}),
],
trustedOrigins: ["myapp://", "http://localhost:3000"],
});
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
No description
18 replies
BABetter Auth
Created by Abhay Ramesh on 2/23/2025 in #bug-reports
Expo Better Auth breaking with any client plugin "better-auth/client/plugins"
Hey got it narrowed down to v1.1.19, any version before it works, havent tried the beta-versions
18 replies