Merge branch 'release/1.20.0'

This commit is contained in:
2024-02-14 16:50:54 +01:00
3 changed files with 2 additions and 10 deletions

View File

@@ -11,14 +11,6 @@ export const authConfig: NextAuthConfig = {
const isLoggedIn = !!auth?.user; const isLoggedIn = !!auth?.user;
return (isLoggedIn); 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 // 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 // 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 // see: https://stackoverflow.com/questions/70409219/get-user-id-from-session-in-next-auth-client

View File

@@ -15,7 +15,7 @@ const providerLogo = (provider: {id:string, name:string}) => {
} }
export const SignInButton:React.FC<{ provider: {id:string, name:string} }> = ({ provider }) => export const SignInButton:React.FC<{ provider: {id:string, name:string} }> = ({ provider }) =>
<button className="btn btn-neutral" onClick={() => signIn(provider.id)}> <button className="btn btn-neutral" onClick={() => signIn(provider.id, { callbackUrl:"https://rezije.app/" }) }>
<Image alt="Provider Logo" loading="lazy" height="24" width="24" id="provider-logo-dark" src={providerLogo(provider)} /> <Image alt="Provider Logo" loading="lazy" height="24" width="24" id="provider-logo-dark" src={providerLogo(provider)} />
<span>Sign in with {provider.name}</span> <span>Sign in with {provider.name}</span>
</button> </button>

View File

@@ -9,7 +9,7 @@ networks:
services: services:
web-app: web-app:
image: utility-bills-tracker:1.19.2 image: utility-bills-tracker:1.20.0
networks: networks:
- traefik-network - traefik-network
- mongo-network - mongo-network