Email Templates

Email Templates #

The Email template tab serves as a platform for configuring emails and messages sent to users for specific scenarios associated with the application using CoSync Auth. It is crucial for developers who wish to fully customize their software to align with their company’s identity.

The following are the messaging scenarios available in the Email template tab for the application using CoSync Auth:

  • Email verification on signup (Code signup flow)
  • Click-through page on signup (Link signup flow)
  • Signup Success
  • Password reset
  • User invitation to onboard
  • QR verification for Google Authenticator app
  • SMS verification for phone 2-factor verification

The customization of email templates involves modifying the HTML for a particular message. The system facilitates this customization by supporting three macro values, which can be utilized to substitute text within the message. The macro language uses the percent symbol %% to indicate the substitution. CoSync Auth supports the following three macros:

  • %APP_NAME% - the name of your app, as set by the App Name field.
  • %HANDLE% - the recipients email address or phone number.
  • %CODE% - the code set to the user email (or phone) for account verification.
  • %LINK% - The link to send to user for account verification

The %LINK% macro is the only macro that the developer can set. The default value of this macro is the word “LINK”, which can be changed to a different word to support different locales (discussed below). The %LINK% word is presented to the user in an email as a link that the end user can click on to verify their email.


emailtemplates


Email Verification #

The Email Verification is dispatched to a user in response to signing up into the App through a Code signup flow.

To provide an example, let’s consider a scenario where the developer is creating an App named “Toto” for the company XYZSoft, and the CEO of XYZSoft is Bob XYZ. To edit the message, click on the pencil icon located next to the Message section. You can then proceed to make edits to the Message HTML in the following manner:


emailmessage


Upon successful signup into the Toto app through a Code signup flow, a user (e.g., ‘Richard Krueger’) would receive the following email displayed.


email


The Email Link Verification is dispatched to a user in response to signing up into the App through a Link signup flow.

To provide an example, let’s consider a scenario where the developer is creating an App named “Toto” for the company XYZSoft, and the CEO of XYZSoft is Bob XYZ. To edit the message, click on the pencil icon located next to the Message section. You can then proceed to make edits to the Message HTML in the following manner:


emaillinkverification


Upon successful signup into the Toto app through a Link signup flow, the following email displayed.


emaillink


Click Through Page #

The Click Through page allows customization of the web page shown to a user during onboarding through a Link signup flow. When the user clicks the ‘click here link in the email, it informs CoSync Auth that the email is associated with the user and is verified.

The default Click Through Page is specified as follows:


clickthrough


Signup Success #

The Signup Success page allows customization of the email that is sent to the user after a successful signup.

The default Signup Success page is specified as follows:


signupsuccess


Password Reset #

The Password Reset page offers the ability to customize the email sent to a user who has forgotten their password. This customization is achieved using the ForgotPassword function of the CoSync Auth REST API. The forgot password process always involves sending the user a code to verify their identity. The user then enters the code along with the new password to reset it. It’s important to note that there is no link version of the forgot password process; verification is solely based on the code sent to the user.


forgotpassword


Invite #

The Invite page provides the option to personalize the email dispatched to a user who has received an ‘invitation’ to onboard into an application. This invitation process differs from the traditional signup, serving applications that seek a higher level of control over their user base rather than catering to the general public.


invite


QR Verification #

The QR Verification feature allows customization of the email sent to the user when they enable Google two-factor authentication for their account. For this to work, Google must be set as the default two-factor verification for the app within the AUTH tab of the Application Detail in the CoSync Portal.

The email sent to the user will contain text along with the Google Authenticator secret key (specified by the %CODE% macro). Additionally, the email will include an image of the QR code, which the user can scan using the Google Authenticator app.


googleqr


This email format is specified with the QR Verification tab as follows:


qrverify


SMS Verification #

The SMS Verification feature offers developers the ability to personalize the content of the SMS message sent by Twilio to a user when the user enables Phone two-factor verification during login into their account. To utilize this feature, the Phone option must be set as the default two-factor verification for the app within the AUTH tab of the Application Detail in the CoSync Portal.

The format of the SMS message is specified with the SMS Verificaiton tab as follows:


sms