From 0f6a6a69831bc45b223f7d3fa0e8bbb7b47e3849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Dur=C3=A1n?= Date: Mon, 4 Sep 2023 15:21:54 +0200 Subject: [PATCH] Fix callback --- src/sections/ticket-home.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sections/ticket-home.tsx b/src/sections/ticket-home.tsx index 84172495..1bcadda3 100644 --- a/src/sections/ticket-home.tsx +++ b/src/sections/ticket-home.tsx @@ -40,7 +40,10 @@ export const TicketHome = ({ ticketNumber, username, initialFlavor }) => { const { data, error } = await supabase.auth.signInWithOAuth({ provider: 'github', options: { - redirectTo: 'http://localhost:3000/api/auth/callback' + redirectTo: + process.env.NODE_ENV !== 'production' + ? 'http://localhost:3000/api/auth/callback' + : 'https://miduconf.com/api/auth/callback' } }) }