mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-25 08:31:37 -05:00
chore: lint
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { dashClient } from "@better-auth/dash/client";
|
||||
import { oauthProviderClient } from "@better-auth/oauth-provider/client";
|
||||
import { passkeyClient } from "@better-auth/passkey/client";
|
||||
import { stripeClient } from "@better-auth/stripe/client";
|
||||
@@ -18,7 +17,6 @@ import type { auth } from "./auth";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
plugins: [
|
||||
dashClient(),
|
||||
organizationClient(),
|
||||
twoFactorClient({
|
||||
onTwoFactorRedirect() {
|
||||
|
||||
@@ -24,12 +24,9 @@ import {
|
||||
import { MysqlDialect } from "kysely";
|
||||
import { createPool } from "mysql2/promise";
|
||||
import { Stripe } from "stripe";
|
||||
import { reactInvitationEmail } from "./email/invitation";
|
||||
import { resend } from "./email/resend";
|
||||
import { reactResetPasswordEmail } from "./email/reset-password";
|
||||
|
||||
const from = process.env.BETTER_AUTH_EMAIL || "delivered@resend.dev";
|
||||
const to = process.env.TEST_EMAIL || "";
|
||||
const _from = process.env.BETTER_AUTH_EMAIL || "delivered@resend.dev";
|
||||
const _to = process.env.TEST_EMAIL || "";
|
||||
|
||||
const dialect = (() => {
|
||||
if (process.env.USE_MYSQL) {
|
||||
|
||||
@@ -206,18 +206,17 @@ describe("Origin Check", async (it) => {
|
||||
});
|
||||
|
||||
describe("Fetch Metadata CSRF Protection", async (it) => {
|
||||
const { customFetchImpl, testUser, auth, signInWithTestUser } =
|
||||
await getTestInstance({
|
||||
trustedOrigins: ["http://localhost:3000", "https://app.example.com"],
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
async sendResetPassword(url, user) {},
|
||||
},
|
||||
advanced: {
|
||||
disableCSRFCheck: false,
|
||||
disableOriginCheck: false,
|
||||
},
|
||||
});
|
||||
const { testUser, auth } = await getTestInstance({
|
||||
trustedOrigins: ["http://localhost:3000", "https://app.example.com"],
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
async sendResetPassword(url, user) {},
|
||||
},
|
||||
advanced: {
|
||||
disableCSRFCheck: false,
|
||||
disableOriginCheck: false,
|
||||
},
|
||||
});
|
||||
|
||||
it("should block cross-site navigation on first-login (no session cookie)", async (ctx) => {
|
||||
const maliciousRequest = new Request(
|
||||
|
||||
Reference in New Issue
Block a user