-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
General eslint prettier + UI lib version update (#10)
- Loading branch information
Showing
141 changed files
with
3,484 additions
and
2,597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import { NextResponse } from 'next/server' | ||
import { cookies } from 'next/headers' | ||
import { createClient } from '@/lib/supabase/server' | ||
import { cookies } from "next/headers"; | ||
import { NextResponse } from "next/server"; | ||
|
||
import { createClient } from "@/lib/supabase/server"; | ||
|
||
export async function GET(request: Request) { | ||
// The `/auth/callback` route is required for the server-side auth flow implemented | ||
// by the Auth Helpers package. It exchanges an auth code for the user's session. | ||
// https://supabase.com/docs/guides/auth/auth-helpers/nextjs#managing-sign-in-with-code-exchange | ||
const requestUrl = new URL(request.url) | ||
const code = requestUrl.searchParams.get('code') | ||
const requestUrl = new URL(request.url); | ||
const code = requestUrl.searchParams.get("code"); | ||
|
||
if (code) { | ||
const cookieStore = cookies() | ||
const supabase = createClient(cookieStore) | ||
await supabase.auth.exchangeCodeForSession(code) | ||
const cookieStore = cookies(); | ||
const supabase = createClient(cookieStore); | ||
await supabase.auth.exchangeCodeForSession(code); | ||
} | ||
|
||
// URL to redirect to after sign in process completes | ||
return NextResponse.redirect(requestUrl.origin) | ||
return NextResponse.redirect(requestUrl.origin); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import { createClient } from '@/lib/supabase/server' | ||
import { cookies } from 'next/headers' | ||
import { type NextRequest, NextResponse } from 'next/server' | ||
import { cookies } from "next/headers"; | ||
import { NextResponse, type NextRequest } from "next/server"; | ||
|
||
export const dynamic = 'force-dynamic' | ||
import { createClient } from "@/lib/supabase/server"; | ||
|
||
export const dynamic = "force-dynamic"; | ||
|
||
export async function POST(req: NextRequest) { | ||
const cookieStore = cookies() | ||
const supabase = createClient(cookieStore) | ||
const cookieStore = cookies(); | ||
const supabase = createClient(cookieStore); | ||
|
||
// Check if we have a session | ||
const { | ||
data: { session }, | ||
} = await supabase.auth.getSession() | ||
} = await supabase.auth.getSession(); | ||
|
||
if (session) { | ||
await supabase.auth.signOut() | ||
await supabase.auth.signOut(); | ||
} | ||
|
||
return NextResponse.redirect(new URL('/signin', req.url), { | ||
return NextResponse.redirect(new URL("/signin", req.url), { | ||
status: 302, | ||
}) | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.