Merged
Conversation
…e variants - Removed the Halo component and replaced it with WelcomeHalo for the WelcomePage. - Removed the OAuthButton component and replaced it with WelcomeOAuthButton. - Introduced new OAuthCallback page. - Modified common.json to simplify the Google OAuth button text. srcs/nginx/src/components/atoms/Halo.tsx srcs/nginx/src/components/atoms/OAuthButton.tsx srcs/nginx/src/components/atoms/welcome/WelcomeButton.tsx srcs/nginx/src/components/atoms/welcome/WelcomeCircle.tsx srcs/nginx/src/components/atoms/welcome/WelcomeHalo.tsx srcs/nginx/src/components/atoms/welcome/WelcomeInput.tsx srcs/nginx/src/components/atoms/welcome/WelcomeOAuthButton.tsx srcs/nginx/src/components/organisms/welcome/WelcomeLoginForm.tsx srcs/nginx/src/components/organisms/welcome/WelcomeRegisterForm.tsx srcs/nginx/src/locales/tf/common.json srcs/nginx/src/pages/OAuthCallback.tsx srcs/nginx/src/pages/WelcomePage.tsx
fix(auth_error): améliorer le traitement des erreurs zod refactor(WelcomeHalo): simplifier la gestion des classes CSS et des états refactor(WelcomeInput): ajouter la possibilité d'afficher/masquer le mot de passe
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the nginx (frontend) authentication experience by introducing a new “Welcome/Atome” UI and adding OAuth login support for Google and 42, including an OAuth callback page and new i18n keys.
Changes:
- Replaces legacy auth UI (Halo/LoginForm/RegisterForm) with new Welcome* components + realtime validation checklist.
- Adds OAuth buttons, OAuth URL/state handling, and an OAuth callback page wired into routing.
- Improves frontend error-detail mapping (Zod →
ErrorDetail) and extends translations (EN/FR/TF).
Reviewed changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| srcs/nginx/src/pages/WelcomePage.tsx | Switches to WelcomeHalo layout for the new auth UI. |
| srcs/nginx/src/pages/OAuthCallback.tsx | New page to process OAuth redirect and trigger login() on success. |
| srcs/nginx/src/App.tsx | Adds /login, /register, and /auth/oauth/:provider/callback routes. |
| srcs/nginx/src/api/oauthActions.ts | Adds OAuth URL builder, CSRF state handling, and callback action. |
| srcs/nginx/src/api/auth-api.ts | Adds oauthCallback() client call to backend OAuth callback endpoint. |
| srcs/nginx/src/api/api-client.ts | Maps backend Zod-ish error payloads into ErrorDetail[]. |
| srcs/nginx/src/components/atoms/welcome/WelcomeHalo.tsx | New halo container orchestrating login/register forms with the new design. |
| srcs/nginx/src/components/atoms/welcome/WelcomeCircle.tsx | New “glassmorphism” circle container for Welcome UI. |
| srcs/nginx/src/components/atoms/welcome/WelcomeInput.tsx | New styled input with icons, error display, and password visibility toggle. |
| srcs/nginx/src/components/atoms/welcome/WelcomeButton.tsx | New styled button component for Welcome UI. |
| srcs/nginx/src/components/atoms/welcome/WelcomeOAuthButton.tsx | New OAuth button variants for Google and 42. |
| srcs/nginx/src/components/atoms/welcome/ValidationChecklist.tsx | New realtime validation checklist UI for username/password rules. |
| srcs/nginx/src/components/organisms/welcome/WelcomeLoginForm.tsx | New login form integrating OAuth buttons + improved error mapping. |
| srcs/nginx/src/components/organisms/welcome/WelcomeRegisterForm.tsx | New register form integrating OAuth buttons + realtime validation. |
| srcs/nginx/src/components/organisms/LoginForm.tsx | Removes legacy login form. |
| srcs/nginx/src/components/organisms/RegisterForm.tsx | Removes legacy register form. |
| srcs/nginx/src/components/atoms/Halo.tsx | Removes legacy halo container. |
| srcs/nginx/src/assets/icons/google.svg | Adds Google icon for OAuth button. |
| srcs/nginx/src/assets/icons/42.svg | Adds 42 icon for OAuth button. |
| srcs/nginx/src/locales/en/common.json | Adds oauth + validation translation keys (EN). |
| srcs/nginx/src/locales/fr/common.json | Adds oauth + validation translation keys (FR). |
| srcs/nginx/src/locales/tf/common.json | Adds oauth + validation translation keys (TF). |
- Ajout de la gestion du mode d'enregistrement dans le composant WelcomePage - Validation de la réponse OAuth pour s'assurer que le nom d'utilisateur est présent - Ajout de traductions pour les boutons d'affichage/cachage du mot de passe - Remplacement des styles de défilement pour le composant WelcomeCircle dans style.css
lisambet
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎨 feat(auth): Refonte UI authentication + OAuth integration (Google & 42)
📋 Vue d'ensemble
Cette PR refond complètement l'interface d'authentification (login/register) avec une nouvelle identité visuelle et intègre l'authentification OAuth pour Google et 42 School.
Branche:
oauth-front→mainImpacts: Frontend uniquement (nginx service)
✨ Changements majeurs
1. Nouvelle UI Authentication (Design "Atome")
Refonte complète de l'interface avec une identité visuelle cohérente :
from-[#00ff9f] to-[#0088ff]Fichiers ajoutés :
Fichiers supprimés :
srcs/nginx/src/components/atoms/Halo.tsx(remplacé par WelcomeHalo)srcs/nginx/src/components/organisms/LoginForm.tsx(remplacé par WelcomeLoginForm)srcs/nginx/src/components/organisms/RegisterForm.tsx(remplacé par WelcomeRegisterForm)2. OAuth Integration (Google & 42 School)
Implémentation complète du flux OAuth 2.0 conforme RFC 6749 :
Architecture
Pattern identique à LoginForm/RegisterForm :
OAuthCallbackStateComposants OAuth
Sécurité CSRF : Cross-Site Request Forgery
Protection contro les attaques CSRF via state parameter (RFC 6749 §10.12) :
Flux OAuth
buildOAuthUrl()génère URL avec state CSRF/auth/oauth/:provider/callbackoauthCallbackAction()vérifie state + échange code contre JWTlogin()via AuthProvider → redirection PublicRouteConfiguration
Variables d'environnement requises :
Fichiers ajoutés :
3. Validation en temps réel
Nouveau composant
ValidationChecklist:Fonctionnalités :
4. Gestion d'erreurs améliorée
Transformation erreurs Zod
api-client.ts - Mapping des erreurs Zod brutes en
ErrorDetail:Affichage erreurs par champ
Les erreurs sont maintenant contextualisées sur le champ concerné :
LoginForm :
identifier→ Erreur affichée sous le champ username/emailpassword→ Erreur affichée sous le champ passwordRegisterForm :
username,email,password6. Internationalisation (i18n)
Nouvelles clés de traduction (EN, FR, TF) :
🧪 Tests
Tests manuels effectués
✅ Login classique (username + password)
✅ Register classique (username, email, password)
✅ Validation temps réel (password & username)
✅ Toggle password visibility (eye icon)
✅ Gestion erreurs (champs requis, format invalide, conflict)
✅ Responsive design (mobile, tablet, desktop)
✅ OAuth Google (redirect + callback + login)
✅ OAuth 42 (redirect + callback + login)
✅ CSRF protection (state validation)
✅ Gestion erreurs OAuth (authorization_denied, missing_code, invalid_state)
À tester en intégration
/auth/oauth/:provider/callback📸 Aperçu visuel
Screencast-from-02-25-2026-09_22_18-AM.mp4
📚 Références
RFCs & Standards
Documentation officielle
🚀 Déploiement
Variables d'environnement requises