Skip to content

Commit 564ebfd

Browse files
committed
fix types
1 parent 2ee6cba commit 564ebfd

4 files changed

Lines changed: 3 additions & 14 deletions

File tree

apps/sim/app/api/auth/socket-token/route.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ export async function POST() {
1010

1111
try {
1212
const hdrs = await headers()
13-
const api = auth.api as typeof auth.api & {
14-
generateOneTimeToken: (ctx: { headers: Headers }) => Promise<{ token: string }>
15-
}
16-
const response = await api.generateOneTimeToken({
13+
const response = await auth.api.generateOneTimeToken({
1714
headers: hdrs,
1815
})
1916

apps/sim/app/api/auth/sso/register/route.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,7 @@ export async function POST(request: NextRequest) {
377377
),
378378
})
379379

380-
const api = auth.api as typeof auth.api & {
381-
registerSSOProvider: (ctx: {
382-
body: unknown
383-
headers: Headers
384-
}) => Promise<{ providerId: string }>
385-
}
386-
const registration = await api.registerSSOProvider({
380+
const registration = await auth.api.registerSSOProvider({
387381
body: providerConfig,
388382
headers,
389383
})

apps/sim/lib/auth/auth.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
oneTimeToken,
2020
organization,
2121
} from 'better-auth/plugins'
22-
import type { BetterAuthPlugin } from 'better-auth/types'
2322
import { emailHarmony } from 'better-auth-harmony'
2423
import { and, eq, inArray, sql } from 'drizzle-orm'
2524
import { headers } from 'next/headers'
@@ -712,7 +711,7 @@ export const auth = betterAuth({
712711
},
713712
plugins: [
714713
nextCookies(),
715-
...(isSignupEmailValidationEnabled ? [emailHarmony() as BetterAuthPlugin] : []),
714+
...(isSignupEmailValidationEnabled ? [emailHarmony()] : []),
716715
...(env.TURNSTILE_SECRET_KEY
717716
? [
718717
captcha({

bun.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)