diff --git a/backend/src/controllers/signupController.ts b/backend/src/controllers/signupController.ts index 90fad4744..42bef4973 100644 --- a/backend/src/controllers/signupController.ts +++ b/backend/src/controllers/signupController.ts @@ -10,6 +10,7 @@ import { } from '../helpers/signup'; import { issueTokens, createToken } from '../helpers/auth'; import { INVITED, ACCEPTED } from '../variables'; +import axios from 'axios'; /** * Signup step 1: Initialize account for user under email [email] and send a verification code @@ -179,6 +180,21 @@ export const completeAccountSignup = async (req: Request, res: Response) => { token = tokens.token; refreshToken = tokens.refreshToken; + + // sending a welcome email to new users + if (process.env.LOOPS_API_KEY) { + await axios.post("https://app.loops.so/api/v1/events/send", { + "email": email, + "eventName": "Sign Up", + "firstName": firstName, + "lastName": lastName + }, { + headers: { + "Accept": "application/json", + "Authorization": "Bearer " + process.env.LOOPS_API_KEY + }, + }); + } } catch (err) { Sentry.setUser(null); Sentry.captureException(err); diff --git a/frontend/pages/signup.tsx b/frontend/pages/signup.tsx index 51e2e1c05..a98e5cf29 100644 --- a/frontend/pages/signup.tsx +++ b/frontend/pages/signup.tsx @@ -260,46 +260,49 @@ export default function SignUp() { // Step 1 of the sign up process (enter the email or choose google authentication) const step1 = ( -
- {'Let\''}s get started -
-+ {'Let\''}s get started +
+I do not want to receive emails about Infisical and its products.
++ By creating an account, you agree to our Terms and have read and + acknowledged the Privacy Policy. +
+I do not want to receive emails about Infisical and its products.
-- By creating an account, you agree to our Terms and have read and - acknowledged the Privacy Policy. -
-