@@ -19,6 +19,7 @@ import {
1919 oneTimeToken ,
2020 organization ,
2121} from 'better-auth/plugins'
22+ import type { BetterAuthPlugin } from 'better-auth/types'
2223import { emailHarmony } from 'better-auth-harmony'
2324import { and , eq , inArray , sql } from 'drizzle-orm'
2425import { headers } from 'next/headers'
@@ -559,12 +560,12 @@ export const auth = betterAuth({
559560 github : {
560561 clientId : env . GITHUB_CLIENT_ID as string ,
561562 clientSecret : env . GITHUB_CLIENT_SECRET as string ,
562- scopes : [ 'user:email' , 'repo' ] ,
563+ scope : [ 'user:email' , 'repo' ] ,
563564 } ,
564565 google : {
565566 clientId : env . GOOGLE_CLIENT_ID as string ,
566567 clientSecret : env . GOOGLE_CLIENT_SECRET as string ,
567- scopes : [
568+ scope : [
568569 'https://www.googleapis.com/auth/userinfo.email' ,
569570 'https://www.googleapis.com/auth/userinfo.profile' ,
570571 ] ,
@@ -602,7 +603,6 @@ export const auth = betterAuth({
602603 emailAndPassword : {
603604 enabled : true ,
604605 requireEmailVerification : isEmailVerificationEnabled ,
605- sendVerificationOnSignUp : isEmailVerificationEnabled , // Auto-send verification OTP on signup when verification is required
606606 throwOnMissingCredentials : true ,
607607 throwOnInvalidCredentials : true ,
608608 sendResetPassword : async ( { user, url, token } , request ) => {
@@ -712,7 +712,7 @@ export const auth = betterAuth({
712712 } ,
713713 plugins : [
714714 nextCookies ( ) ,
715- ...( isSignupEmailValidationEnabled ? [ emailHarmony ( ) ] : [ ] ) ,
715+ ...( isSignupEmailValidationEnabled ? [ emailHarmony ( ) as BetterAuthPlugin ] : [ ] ) ,
716716 ...( env . TURNSTILE_SECRET_KEY
717717 ? [
718718 captcha ( {
0 commit comments