From fffe0b5e7d07ea61822077fa105dde1d4dfb97ce Mon Sep 17 00:00:00 2001 From: Seth Akins Date: Wed, 17 Jan 2024 15:01:15 -0800 Subject: [PATCH] Renamed references to old env file and ran tests --- .gitignore | 2 +- src/components/GoogleSigninButton/index.tsx | 2 +- src/lib/auth.ts | 6 ++---- src/utils/sendVideo.ts | 12 ++++++------ 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 9385574c..79e04669 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ yarn-debug.log* yarn-error.log* # local env files -.env +.env* cypress.env.json # vercel diff --git a/src/components/GoogleSigninButton/index.tsx b/src/components/GoogleSigninButton/index.tsx index 1f38f705..2c727e97 100644 --- a/src/components/GoogleSigninButton/index.tsx +++ b/src/components/GoogleSigninButton/index.tsx @@ -49,7 +49,7 @@ export default function GoogleSignInButton() { function signInWithGoogle(e: React.MouseEvent) { e.preventDefault() signIn('google', { - callbackUrl: `${ process.env.appBaseUrl }/dashboard`, + callbackUrl: `${ process.env.BASE_URL }/dashboard`, }).catch((err) => { logger.error('An unexpected error occurred while log in with Google: ' + err.error) }) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 761f38ae..f2bc2e96 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -30,8 +30,8 @@ export const authOptions: NextAuthOptions = { secret: process.env.NEXT_PUBLIC_NEXTAUTH_SECRET, providers: [ GoogleProvider({ - clientId: process.env.googleClientId as string, - clientSecret: process.env.googleClientSecret as string, + clientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID as string, + clientSecret: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_SECRET as string, profile(profile) { return { id: profile.sub, @@ -82,8 +82,6 @@ export const authOptions: NextAuthOptions = { }, } -console.log('Goodbye') - function passwordMatch(enteredPassword: string, password: string): Promise { return compare(enteredPassword, password) } diff --git a/src/utils/sendVideo.ts b/src/utils/sendVideo.ts index ff72c655..ac7fd5bd 100644 --- a/src/utils/sendVideo.ts +++ b/src/utils/sendVideo.ts @@ -39,18 +39,18 @@ export default async function sendVideo(rawVideo: File, owner: User): Promise