Merge branch 'release/1.26.0'
This commit is contained in:
3
.env
3
.env
@@ -3,3 +3,6 @@ MONGODB_URI=mongodb://root:example@localhost:27017/
|
|||||||
GOOGLE_ID=355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com
|
GOOGLE_ID=355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com
|
||||||
GOOGLE_SECRET=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
|
GOOGLE_SECRET=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
|
||||||
AUTH_SECRET=Gh0jQ35oq6DR8HkLR3heA8EaEDtxYN/xkP6blvukZ0w=
|
AUTH_SECRET=Gh0jQ35oq6DR8HkLR3heA8EaEDtxYN/xkP6blvukZ0w=
|
||||||
|
|
||||||
|
LINKEDIN_ID=776qlcsykl1rag
|
||||||
|
LINKEDIN_SECRET=ugf61aJ2iyErLK40
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import NextAuth, { NextAuthConfig } from 'next-auth';
|
import NextAuth, { NextAuthConfig } from 'next-auth';
|
||||||
import GoogleProvider from 'next-auth/providers/google';
|
import GoogleProvider from 'next-auth/providers/google';
|
||||||
|
import LinkedinProvider from 'next-auth/providers/linkedin';
|
||||||
import { Session } from 'next-auth';
|
import { Session } from 'next-auth';
|
||||||
import { AuthenticatedUser } from './types/next-auth';
|
import { AuthenticatedUser } from './types/next-auth';
|
||||||
import { defaultLocale } from '../i18n';
|
import { defaultLocale } from '../i18n';
|
||||||
@@ -37,6 +38,10 @@ export const authConfig: NextAuthConfig = {
|
|||||||
clientId: process.env.GOOGLE_ID,
|
clientId: process.env.GOOGLE_ID,
|
||||||
clientSecret: process.env.GOOGLE_SECRET,
|
clientSecret: process.env.GOOGLE_SECRET,
|
||||||
}),
|
}),
|
||||||
|
LinkedinProvider({
|
||||||
|
clientId: process.env.LINKEDIN_ID,
|
||||||
|
clientSecret: process.env.LINKEDIN_SECRET,
|
||||||
|
})
|
||||||
],
|
],
|
||||||
secret: process.env.AUTH_SECRET,
|
secret: process.env.AUTH_SECRET,
|
||||||
trustHost: true, // needs to be set to false for the NextJS to work behing Traefik
|
trustHost: true, // needs to be set to false for the NextJS to work behing Traefik
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const providerLogo = (provider: {id:string, name:string}) => {
|
|||||||
case "github": return "https://authjs.dev/img/providers/github.svg";
|
case "github": return "https://authjs.dev/img/providers/github.svg";
|
||||||
case "twitter": return "https://authjs.dev/img/providers/twitter.svg";
|
case "twitter": return "https://authjs.dev/img/providers/twitter.svg";
|
||||||
case "email": return "https://authjs.dev/img/providers/email.svg";
|
case "email": return "https://authjs.dev/img/providers/email.svg";
|
||||||
|
case "linkedin": return "https://authjs.dev/img/providers/linkedin.svg";
|
||||||
default: return "https://authjs.dev/img/providers/google.svg";
|
default: return "https://authjs.dev/img/providers/google.svg";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +21,7 @@ export const SignInButton:React.FC<{ provider: {id:string, name:string} }> = ({
|
|||||||
const t = useTranslations("login-page");
|
const t = useTranslations("login-page");
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<button className="btn btn-neutral" onClick={() => signIn(provider.id, { callbackUrl:"https://rezije.app/" }) }>
|
<button className="btn btn-neutral mx-1" 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>
|
<span>
|
||||||
{t("sign-in-button")} {provider.name}</span>
|
{t("sign-in-button")} {provider.name}</span>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
web-app:
|
web-app:
|
||||||
image: utility-bills-tracker:1.25.8
|
image: utility-bills-tracker:1.26.0
|
||||||
networks:
|
networks:
|
||||||
- traefik-network
|
- traefik-network
|
||||||
- mongo-network
|
- mongo-network
|
||||||
@@ -20,6 +20,8 @@ services:
|
|||||||
GOOGLE_ID: 355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com
|
GOOGLE_ID: 355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com
|
||||||
GOOGLE_SECRET: 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
|
GOOGLE_SECRET: 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
|
||||||
AUTH_SECRET: Gh0jQ35oq6DR8HkLR3heA8EaEDtxYN/xkP6blvukZ0w=
|
AUTH_SECRET: Gh0jQ35oq6DR8HkLR3heA8EaEDtxYN/xkP6blvukZ0w=
|
||||||
|
LINKEDIN_ID: 776qlcsykl1rag
|
||||||
|
LINKEDIN_SECRET: ugf61aJ2iyErLK40
|
||||||
HOSTNAME: rezije.app # IP address at which the server will be listening (0.0.0.0 = listen on all addresses)
|
HOSTNAME: rezije.app # IP address at which the server will be listening (0.0.0.0 = listen on all addresses)
|
||||||
NEXTAUTH_URL: https://rezije.app # URL next-auth will use while redirecting user during authentication (if not set - will use HOSTNAME)
|
NEXTAUTH_URL: https://rezije.app # URL next-auth will use while redirecting user during authentication (if not set - will use HOSTNAME)
|
||||||
PORT: ${PORT:-80}
|
PORT: ${PORT:-80}
|
||||||
|
|||||||
Reference in New Issue
Block a user