Skip to content

Commit

Permalink
fix: remove supabase
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed Jun 3, 2023
1 parent 8b37f15 commit 483f5be
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
23 changes: 0 additions & 23 deletions app/(main)/login/page.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions app/auth/callback/route.ts

This file was deleted.

8 changes: 1 addition & 7 deletions middleware.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { createMiddlewareClient } from '@supabase/auth-helpers-nextjs'
import { get } from '@vercel/edge-config'
import { type NextRequest, NextResponse } from 'next/server'

import { kvKeys } from '~/config/kv'
import { env } from '~/env.mjs'
import countries from '~/lib/countries.json'
import { type Database } from '~/lib/database.types'
import { getIP } from '~/lib/ip'
import { redis } from '~/lib/redis'

Expand Down Expand Up @@ -55,9 +53,5 @@ export async function middleware(req: NextRequest) {
await redis.set(kvKeys.currentVisitor, { country, city, flag })
}

const res = NextResponse.next()
const supabase = createMiddlewareClient<Database>({ req, res })
await supabase.auth.getSession()

return res
return NextResponse.next()
}

0 comments on commit 483f5be

Please sign in to comment.