Skip to content

Commit

Permalink
Merge pull request #4862 from Giveth/feat/verify_email_flow
Browse files Browse the repository at this point in the history
Feat/Verification of the user email
  • Loading branch information
kkatusic authored Nov 22, 2024
2 parents 02a85a3 + bfc5521 commit 606ca16
Show file tree
Hide file tree
Showing 17 changed files with 1,334 additions and 115 deletions.
16 changes: 14 additions & 2 deletions lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,18 @@
"label.eligible_networks_for_matching": "Xarxes aptes per a la concordança QF",
"label.email": "correu electrònic",
"label.email_address": "Adreça electrònica",
"label.email_verified": "Correu electrònic verificat",
"label.email_verify": "Verifica el correu electrònic",
"label.email_already_verified": "El teu correu electrònic ha estat verificat. Ara pots desar la informació del teu perfil.",
"label.email_used": "Aquesta adreça de correu electrònic s'utilitzarà per enviar-te comunicacions importants.",
"label.email_used_another": "Aquest correu electrònic ja ha estat verificat en un altre perfil!",
"label.email_sent_to": "Codi de verificació enviat a {email}",
"label.email_please_verify": "Si us plau, verifica el teu correu electrònic. Introdueix el codi de confirmació enviat al teu correu.",
"label.email_get_resend": "No has rebut el correu? Revisa la teva carpeta de correu brossa o <button>Reenvia l'enllaç de verificació!</button>",
"label.email_confirm_code": "Confirma el codi",
"label.email_verify_banner": "Obté l'accés complet als teus comptes i projectes. Verifica la teva adreça de correu electrònic! <button>Verifica el correu</button>",
"label.email_actions_text": "Verifica el teu correu electrònic per gestionar els teus projectes!",
"label.email_error_verify": "Error de verificació del correu electrònic",
"label.enable_change": "Habilita el canvi",
"label.enable_recurring_donations": "Habilitar Donacions Recurrents",
"label.ends_on": "acaba el",
Expand Down Expand Up @@ -610,7 +622,7 @@
"label.loading": "Carregant",
"label.loading_data": "Carregant Dades",
"label.location": "Ubicació",
"label.location_optional": "ubicació (opcional)",
"label.location_optional": "Ubicació (opcional)",
"label.locekd_giv": "GIV Bloquejat",
"label.locked_for": "Bloquejat per",
"label.locked_giv_details": "Detalls del GIV bloquejat",
Expand Down Expand Up @@ -1204,7 +1216,7 @@
"label.wallet": "CARTERA",
"label.wallet_connect": "Connexió de la cartera",
"label.want_to_use_another_wallet": "Vols usar una altra cartera?",
"label.website_or_url": "lloc web o URL",
"label.website_or_url": "Lloc web o URL",
"label.week": "setmana",
"label.welcome_giver": "Benvingut, Giver",
"label.welcome_to_the": "Benvingut a",
Expand Down
18 changes: 15 additions & 3 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,20 @@
"label.elevate_projects": "Elevate Projects",
"label.eligible_for_matching": "Eligible for Matching",
"label.eligible_networks_for_matching": "Eligible networks for QF matching",
"label.email": "email",
"label.email": "Email",
"label.email_address": "Email Address",
"label.email_verified": "Email Verified",
"label.email_verify": "Verify Email",
"label.email_already_verified": "Your email has been verified. You can now save your profile information.",
"label.email_used": "This email address will be used to send you important communications.",
"label.email_used_another": "This email that has already been verified on another profile!",
"label.email_sent_to": "Verification code sent to {email}",
"label.email_please_verify": "Please Verify your email. Enter the confirmation code sent to your email.",
"label.email_get_resend": "Didn't get the email? Check your spam folder or <button>Resend Verification Link!</button>",
"label.email_confirm_code": "Confirm Code",
"label.email_verify_banner": "Get the full access to your accounts and projects. Verify your email address! <button>Verify email</button>",
"label.email_actions_text": "Verify your email to manage your projects!",
"label.email_error_verify": "Error verification email",
"label.enable_change": "Enable Change",
"label.enable_recurring_donations": "Enable Recurring Donations",
"label.ends_on": "ends on",
Expand Down Expand Up @@ -610,7 +622,7 @@
"label.loading": "Loading",
"label.loading_data": "Loading Data",
"label.location": "Location",
"label.location_optional": "location (optional)",
"label.location_optional": "Location (optional)",
"label.locekd_giv": "Locked GIV",
"label.locked_for": "Locked for",
"label.locked_giv_details": "Locked GIV Details",
Expand Down Expand Up @@ -1204,7 +1216,7 @@
"label.wallet": "WALLET",
"label.wallet_connect": "Wallet Connect",
"label.want_to_use_another_wallet": "Want to use another wallet?",
"label.website_or_url": "website or url",
"label.website_or_url": "Website or url",
"label.week": "week",
"label.welcome_giver": "Welcome, Giver",
"label.welcome_to_the": "Welcome to the",
Expand Down
12 changes: 12 additions & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,18 @@
"label.eligible_networks_for_matching": "Redes elegibles para la asignación de QF",
"label.email": "Email",
"label.email_address": "Dirección de Email",
"label.email_verified": "Correo electrónico verificado",
"label.email_verify": "Verificar correo electrónico",
"label.email_already_verified": "Tu correo electrónico ha sido verificado. Ahora puedes guardar la información de tu perfil.",
"label.email_used": "Esta dirección de correo electrónico se utilizará para enviarte comunicaciones importantes.",
"label.email_used_another": "¡Este correo electrónico ya ha sido verificado en otro perfil!",
"label.email_sent_to": "Código de verificación enviado a {email}",
"label.email_please_verify": "Por favor, verifica tu correo electrónico. Ingresa el código de confirmación enviado a tu correo.",
"label.email_get_resend": "¿No recibiste el correo? Revisa tu carpeta de spam o <button>¡Reenviar enlace de verificación!</button>",
"label.email_confirm_code": "Confirmar código",
"label.email_verify_banner": "Obtén acceso completo a tus cuentas y proyectos. ¡Verifica tu dirección de correo electrónico! <button>Verificar correo</button>",
"label.email_actions_text": "¡Verifica tu correo electrónico para gestionar tus proyectos!",
"label.email_error_verify": "Error de verificación del correo electrónico",
"label.enable_change": "Ayuda al Cambio",
"label.enable_recurring_donations": "Habilitar Donaciones Recurrentes",
"label.ends_on": "termina el",
Expand Down
2 changes: 2 additions & 0 deletions pages/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import WalletNotConnected from '@/components/WalletNotConnected';
import UserNotSignedIn from '@/components/UserNotSignedIn';
import UserProfileView from '@/components/views/userProfile/UserProfile.view';
import { ProfileProvider } from '@/context/profile.context';
import VerifyEmailBanner from '@/components/views/userProfile/VerifyEmailBanner';

const AccountRoute = () => {
const { isSignedIn, isEnabled, userData, isLoading } = useAppSelector(
Expand All @@ -27,6 +28,7 @@ const AccountRoute = () => {
<title>{userData?.name} | Giveth</title>
</Head>
<ProfileProvider user={userData!} myAccount>
{!userData?.isEmailVerified && <VerifyEmailBanner />}
<UserProfileView />
</ProfileProvider>
</>
Expand Down
2 changes: 0 additions & 2 deletions pages/project/[projectIdSlug]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { ProjectProvider } from '@/context/project.context';
const ProjectRoute: FC<IProjectBySlug> = ({ project }) => {
useReferral();

console.log({ project });

return (
<ProjectProvider project={project}>
<ProjectIndex />
Expand Down
15 changes: 15 additions & 0 deletions src/apollo/gql/gqlUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,18 @@ export const FETCH_USERS_GIVPOWER_BY_ADDRESS = `
}
}
}`;

export const SEND_USER_EMAIL_CONFIRMATION_CODE_FLOW = gql`
mutation SendUserEmailConfirmationCodeFlow($email: String!) {
sendUserEmailConfirmationCodeFlow(email: $email)
}
`;

export const SEND_USER_CONFIRMATION_CODE_FLOW = gql`
mutation SendUserConfirmationCodeFlow(
$verifyCode: String!
$email: String!
) {
sendUserConfirmationCodeFlow(verifyCode: $verifyCode, email: $email)
}
`;
1 change: 1 addition & 0 deletions src/apollo/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export interface IUser {
wasReferred?: boolean;
isReferrer?: boolean;
chainvineId?: string;
isEmailVerified?: boolean;
}

export interface IPassportInfo {
Expand Down
Loading

0 comments on commit 606ca16

Please sign in to comment.