File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,6 @@ export default async function SignIn() {
6
6
const supabase = createClient ( )
7
7
const { data } = await supabase . auth . getUser ( )
8
8
9
- if ( process . env . NODE_ENV === 'production' ) { // Temporarily redirect to home page in production until we have a proper backend auth flow
10
- redirect ( '/' )
11
- }
12
-
13
9
if ( data ?. user ) {
14
10
redirect ( '/' )
15
11
}
Original file line number Diff line number Diff line change @@ -5,10 +5,6 @@ import SignUpComponent from "@/components/auth/signup"
5
5
export default async function SignUp ( ) {
6
6
const supabase = createClient ( )
7
7
const { data } = await supabase . auth . getUser ( )
8
-
9
- if ( process . env . NODE_ENV === 'production' ) { // Temporarily redirect to home page in production until we have a proper backend auth flow
10
- redirect ( '/' )
11
- }
12
8
13
9
if ( data ?. user ) {
14
10
redirect ( '/' )
Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ import { updateSession } from "./utils/supabase/middleware"
3
3
4
4
export async function middleware ( request : NextRequest ) {
5
5
if (
6
- request . nextUrl . pathname . startsWith ( "/signin" ) ||
7
- request . nextUrl . pathname . startsWith ( "/signup" )
6
+ ( request . nextUrl . pathname . startsWith ( "/signin" ) ||
7
+ request . nextUrl . pathname . startsWith ( "/signup" ) )
8
+ // FEATURE FLAG
9
+ && process . env . NODE_ENV === "production"
8
10
) {
9
11
return NextResponse . redirect ( new URL ( "/" , request . url ) )
10
12
}
You can’t perform that action at this time.
0 commit comments