From b11be8e71787910c4c3c56d1c18d7bf7faddee14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Wed, 14 Feb 2024 16:50:16 +0100 Subject: [PATCH 1/2] Fix: sign-in redirect URL is set --- app/lib/auth.ts | 8 -------- app/ui/SignInButton.tsx | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/lib/auth.ts b/app/lib/auth.ts index aaf260a..5c3eb46 100644 --- a/app/lib/auth.ts +++ b/app/lib/auth.ts @@ -11,14 +11,6 @@ export const authConfig: NextAuthConfig = { const isLoggedIn = !!auth?.user; return (isLoggedIn); }, - redirect({ url, baseUrl }) { - console.log(`redirect(url=${url}, baseUrl=${baseUrl})`); - return url.startsWith(baseUrl) ? url : baseUrl; - }, - signIn({ user, account, profile, email, credentials }) { - console.log(`signIn(user=${user}, account=${account}, profile=${profile}, email=${email}, credentials=${credentials})`); - return true; - }, // method is called when the user is not logged in // this is a hack which takes user ID and assigns it temporaty to the token, which is then used to extend Session.user // see: https://stackoverflow.com/questions/70409219/get-user-id-from-session-in-next-auth-client diff --git a/app/ui/SignInButton.tsx b/app/ui/SignInButton.tsx index 6c2824a..abfda18 100644 --- a/app/ui/SignInButton.tsx +++ b/app/ui/SignInButton.tsx @@ -15,7 +15,7 @@ const providerLogo = (provider: {id:string, name:string}) => { } export const SignInButton:React.FC<{ provider: {id:string, name:string} }> = ({ provider }) => - From 212935f7b8e1b3c78b8a6c6c10581016aae860cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Wed, 14 Feb 2024 16:50:48 +0100 Subject: [PATCH 2/2] updated version in compose file --- docker-compose-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-deploy.yml b/docker-compose-deploy.yml index 3183bb1..87b18ae 100644 --- a/docker-compose-deploy.yml +++ b/docker-compose-deploy.yml @@ -9,7 +9,7 @@ networks: services: web-app: - image: utility-bills-tracker:1.19.2 + image: utility-bills-tracker:1.20.0 networks: - traefik-network - mongo-network