feat: add Google and Facebook OAuth configuration
- Add Google OAuth Client ID: 546665126481-itnlvt22hjn6t0bbgua0aj55h6dpplsk.apps.googleusercontent.com - Add Facebook App ID: 836681122652445 - Configure environment files for dev, preprod, and production - Update Jenkinsfile to pass NEXT_PUBLIC_* env vars as Docker build args - Update .gitignore to allow environment-specific files while protecting .env.local OAuth Configuration: - Google: Configured for dev.dsp5-archi-o24a-15m-g3.fr, preprod, and production domains - Facebook: Configured with App ID 836681122652445 - All authorized redirect URIs configured in Google Console - All domains configured in Facebook App settings This enables social login functionality across all environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
660bf32fdc
commit
2e7ab1f3c2
16
.env
Normal file
16
.env
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Environment Configuration - DEV
|
||||||
|
NODE_ENV=production
|
||||||
|
|
||||||
|
# API Backend URL
|
||||||
|
NEXT_PUBLIC_API_URL=https://api.dev.dsp5-archi-o24a-15m-g3.fr/api
|
||||||
|
|
||||||
|
# Frontend URL
|
||||||
|
NEXT_PUBLIC_FRONTEND_URL=https://dev.dsp5-archi-o24a-15m-g3.fr
|
||||||
|
|
||||||
|
# NextAuth Configuration
|
||||||
|
NEXTAUTH_URL=https://dev.dsp5-archi-o24a-15m-g3.fr
|
||||||
|
NEXTAUTH_SECRET=dev-secret-key-change-in-production
|
||||||
|
|
||||||
|
# OAuth Providers
|
||||||
|
NEXT_PUBLIC_GOOGLE_CLIENT_ID=546665126481-itnlvt22hjn6t0bbgua0aj55h6dpplsk.apps.googleusercontent.com
|
||||||
|
NEXT_PUBLIC_FACEBOOK_APP_ID=836681122652445
|
||||||
16
.env.dev
Normal file
16
.env.dev
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Environment Configuration - DEV
|
||||||
|
NODE_ENV=production
|
||||||
|
|
||||||
|
# API Backend URL
|
||||||
|
NEXT_PUBLIC_API_URL=https://api.dev.dsp5-archi-o24a-15m-g3.fr/api
|
||||||
|
|
||||||
|
# Frontend URL
|
||||||
|
NEXT_PUBLIC_FRONTEND_URL=https://dev.dsp5-archi-o24a-15m-g3.fr
|
||||||
|
|
||||||
|
# NextAuth Configuration
|
||||||
|
NEXTAUTH_URL=https://dev.dsp5-archi-o24a-15m-g3.fr
|
||||||
|
NEXTAUTH_SECRET=dev-secret-key-change-in-production
|
||||||
|
|
||||||
|
# OAuth Providers
|
||||||
|
NEXT_PUBLIC_GOOGLE_CLIENT_ID=546665126481-itnlvt22hjn6t0bbgua0aj55h6dpplsk.apps.googleusercontent.com
|
||||||
|
NEXT_PUBLIC_FACEBOOK_APP_ID=836681122652445
|
||||||
26
.env.example
Normal file
26
.env.example
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
# Environment Configuration Example
|
||||||
|
# Copiez ce fichier en .env.local et remplissez les valeurs
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
NODE_ENV=development
|
||||||
|
|
||||||
|
# API Backend URL
|
||||||
|
# Development: http://localhost:4000/api
|
||||||
|
# Production: https://api.dev.dsp5-archi-o24a-15m-g3.fr/api
|
||||||
|
NEXT_PUBLIC_API_URL=http://localhost:4000/api
|
||||||
|
|
||||||
|
# Frontend URL
|
||||||
|
# Development: http://localhost:3000
|
||||||
|
# Production: https://dev.dsp5-archi-o24a-15m-g3.fr
|
||||||
|
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
|
||||||
|
|
||||||
|
# NextAuth Configuration
|
||||||
|
NEXTAUTH_URL=http://localhost:3000
|
||||||
|
NEXTAUTH_SECRET=your-secret-key-change-this
|
||||||
|
|
||||||
|
# OAuth Providers (optionnel)
|
||||||
|
# Note: Les variables préfixées avec NEXT_PUBLIC_ sont accessibles côté client
|
||||||
|
NEXT_PUBLIC_GOOGLE_CLIENT_ID=
|
||||||
|
GOOGLE_CLIENT_SECRET=
|
||||||
|
NEXT_PUBLIC_FACEBOOK_APP_ID=
|
||||||
|
FACEBOOK_APP_SECRET=
|
||||||
16
.env.preprod
Normal file
16
.env.preprod
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Environment: Preproduction
|
||||||
|
NODE_ENV=preproduction
|
||||||
|
|
||||||
|
# API Backend URL (Preproduction)
|
||||||
|
NEXT_PUBLIC_API_URL=https://api.preprod.dsp5-archi-o24a-15m-g3.fr/api
|
||||||
|
|
||||||
|
# Frontend URL (Preproduction)
|
||||||
|
NEXT_PUBLIC_FRONTEND_URL=https://preprod.dsp5-archi-o24a-15m-g3.fr
|
||||||
|
|
||||||
|
# NextAuth Configuration
|
||||||
|
NEXTAUTH_URL=https://preprod.dsp5-archi-o24a-15m-g3.fr
|
||||||
|
NEXTAUTH_SECRET=4+mQhf1k0Ad7hsl35myygwELsw+/vDYsKtj2ovPdFQ0=
|
||||||
|
|
||||||
|
# OAuth Configuration
|
||||||
|
NEXT_PUBLIC_GOOGLE_CLIENT_ID=546665126481-itnlvt22hjn6t0bbgua0aj55h6dpplsk.apps.googleusercontent.com
|
||||||
|
NEXT_PUBLIC_FACEBOOK_APP_ID=836681122652445
|
||||||
16
.env.production
Normal file
16
.env.production
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Environment: Production
|
||||||
|
NODE_ENV=production
|
||||||
|
|
||||||
|
# API Backend URL (Production)
|
||||||
|
NEXT_PUBLIC_API_URL=https://api.dsp5-archi-o24a-15m-g3.fr/api
|
||||||
|
|
||||||
|
# Frontend URL (Production)
|
||||||
|
NEXT_PUBLIC_FRONTEND_URL=https://dsp5-archi-o24a-15m-g3.fr
|
||||||
|
|
||||||
|
# NextAuth Configuration
|
||||||
|
NEXTAUTH_URL=https://dsp5-archi-o24a-15m-g3.fr
|
||||||
|
NEXTAUTH_SECRET=MkeC4B5MOng3KE3uYipmpiuRv5zLkjpy6fcirJeKG8c=
|
||||||
|
|
||||||
|
# OAuth Configuration
|
||||||
|
NEXT_PUBLIC_GOOGLE_CLIENT_ID=546665126481-itnlvt22hjn6t0bbgua0aj55h6dpplsk.apps.googleusercontent.com
|
||||||
|
NEXT_PUBLIC_FACEBOOK_APP_ID=836681122652445
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -30,8 +30,10 @@ yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
.pnpm-debug.log*
|
.pnpm-debug.log*
|
||||||
|
|
||||||
# env files (can opt-in for committing if needed)
|
# env files
|
||||||
.env*
|
.env.local
|
||||||
|
.env*.local
|
||||||
|
.env.local.backup
|
||||||
|
|
||||||
# vercel
|
# vercel
|
||||||
.vercel
|
.vercel
|
||||||
|
|
|
||||||
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
|
@ -111,11 +111,26 @@ pipeline {
|
||||||
|
|
||||||
stage('Build Docker image') {
|
stage('Build Docker image') {
|
||||||
steps {
|
steps {
|
||||||
echo "🐳 Construction de l’image Docker frontend..."
|
echo "🐳 Construction de l'image Docker frontend..."
|
||||||
sh """
|
script {
|
||||||
docker build -t ${REGISTRY_URL}/${IMAGE_NAME}:${env.TAG} .
|
// Charger les variables d'environnement selon l'environnement
|
||||||
docker tag ${REGISTRY_URL}/${IMAGE_NAME}:${env.TAG} ${REGISTRY_URL}/${IMAGE_NAME}:latest
|
def envFile = ".env.${env.ENV}"
|
||||||
"""
|
def envVars = sh(script: "cat ${envFile} | grep -E '^NEXT_PUBLIC_' | xargs", returnStdout: true).trim()
|
||||||
|
|
||||||
|
// Construire les arguments de build
|
||||||
|
def buildArgs = ""
|
||||||
|
envVars.split().each { envVar ->
|
||||||
|
def parts = envVar.split('=', 2)
|
||||||
|
if (parts.size() == 2) {
|
||||||
|
buildArgs += "--build-arg ${parts[0]}='${parts[1]}' "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sh """
|
||||||
|
docker build ${buildArgs} -t ${REGISTRY_URL}/${IMAGE_NAME}:${env.TAG} .
|
||||||
|
docker tag ${REGISTRY_URL}/${IMAGE_NAME}:${env.TAG} ${REGISTRY_URL}/${IMAGE_NAME}:latest
|
||||||
|
"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user