Skip to content

Commit

Permalink
chore: dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
dowl-air committed May 24, 2024
1 parent b7e472e commit ff9a99e
Show file tree
Hide file tree
Showing 13 changed files with 1,717 additions and 1,805 deletions.
9 changes: 9 additions & 0 deletions .npmcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"depcheck": {
"ignoreMatches": [
"postcss",
"@types/node",
"autoprefixer"
]
}
}
9 changes: 2 additions & 7 deletions app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
import { authOptions as AO } from "@/lib/authOptions";
import { NextAuthOptions } from "next-auth";
import NextAuth from "next-auth/next";

const handler = NextAuth(AO)

export { handler as GET, handler as POST }
import { handlers } from "@/auth"
export const { GET, POST } = handlers
15 changes: 15 additions & 0 deletions auth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { FirestoreAdapter } from "@auth/firebase-adapter";
import NextAuth from "next-auth"
import Google from "next-auth/providers/google"

import { authFirestore } from "./lib/authFirestore";

export const { auth, handlers, signIn, signOut } = NextAuth({
providers: [
Google({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET
})
],
adapter: FirestoreAdapter(authFirestore)
})
12 changes: 12 additions & 0 deletions lib/authFirestore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { initFirestore } from "@auth/firebase-adapter"
import { cert } from "firebase-admin/app"

const { privateKey } = JSON.parse(process.env.GOOGLE_PRIVATE_KEY);

export const authFirestore = initFirestore({
credential: cert({
projectId: process.env.GOOGLE_PROJECTID,
clientEmail: process.env.GOOGLE_CLIENT_EMAIL,
privateKey: privateKey,
}),
})
37 changes: 0 additions & 37 deletions lib/authOptions.ts

This file was deleted.

5 changes: 1 addition & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
swcPlugins: [["next-superjson-plugin", {}]],
},
images: {
remotePatterns: [
{
Expand All @@ -18,7 +15,7 @@ const nextConfig = {
hostname: "firebasestorage.googleapis.com",
},
],
minimumCacheTTL: 2592000, // one month TTL for images
minimumCacheTTL: 2592000,
},
env: {
MEILI_KEY: process.env.MEILI_KEY,
Expand Down
Loading

0 comments on commit ff9a99e

Please sign in to comment.