mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-13 01:25:08 +03:00
Add NEXT_PUBLIC_AUTH_MODES environment variable to Dockerfile and update useAuthModes hook
This commit is contained in:
parent
ae20c5af61
commit
64086b108b
@ -29,6 +29,7 @@ ARG NEXT_PUBLIC_SUPABASE_URL
|
||||
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||
ARG NEXT_PUBLIC_CMS_URL
|
||||
ARG NEXT_PUBLIC_FRONTEND_URL
|
||||
ARG NEXT_PUBLIC_AUTH_MODES # Make sure this is declared here if it influences the build
|
||||
|
||||
ENV NEXT_PUBLIC_ENV=$NEXT_PUBLIC_ENV
|
||||
ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
|
||||
@ -36,6 +37,8 @@ ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
|
||||
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||
ENV NEXT_PUBLIC_CMS_URL=$NEXT_PUBLIC_CMS_URL
|
||||
ENV NEXT_PUBLIC_FRONTEND_URL=$NEXT_PUBLIC_FRONTEND_URL
|
||||
ENV NEXT_PUBLIC_AUTH_MODES=$NEXT_PUBLIC_AUTH_MODES
|
||||
|
||||
|
||||
# Next.js collects completely anonymous telemetry data about general usage.
|
||||
# Learn more here: https://nextjs.org/telemetry
|
||||
|
@ -3,7 +3,8 @@ export const useAuthModes = () => {
|
||||
const authModes = process.env.NEXT_PUBLIC_AUTH_MODES?.split(",") ?? [
|
||||
"password",
|
||||
];
|
||||
|
||||
console.log('Environment Variable NEXT_PUBLIC_AUTH_MODES:', process.env.NEXT_PUBLIC_AUTH_MODES);
|
||||
console.log('authModes:', authModes);
|
||||
return {
|
||||
magicLink: authModes.includes("magic_link"),
|
||||
password: authModes.includes("password"),
|
||||
|
Loading…
Reference in New Issue
Block a user