Flows/Use Cases

Email Verification Outside of Sign Up/In

This article will teach you how to utilize embedded links to verify a user's email outside of the standard sign up/in flow. This use case is applicable when a user signs up with email and password but OTP is not added to the sign up flow to verify the email belongs to the user.

This guide requires access to a messaging connector, like SendGrid, that allows for custom Send Email actions in the flow. Read more on connectors.

Create the SendGrid Connector

SendGrid will be used as the connector on this guide but any custom email connector will work. This guide is more in depth on how to use the SendGrid connector.

From the Connectors page in the Descope Console, select SendGrid and configure it like the image below:

Descope example sendgrid connector configuration

You can test if your connector's configuration is working properly simply by hitting the Test button and viewing the Test Results panel. Save your configuration by hitting Create.

Create the Applicable Flow

Once you've configured the SendGrid connector, you must make the applicable flow. The below is an example of a completed flow. The next sections will cover how to add the related embedded link actions and the SendGrid connector to the flow.

An example of a Descope Flow sending an embedded link and verifying an email

This flow begins by authenticating the user with either an email or username and a password. This does not need to be done in this flow if the user is already authenticated in your project when the flow runs. If you use username for login instead of email, prompt the user for their email after authentication.

Sending the Verification Email

The next screen asks the user to verify their email by entering it and continuing. This hits a condition that checks whether their email is already verified or not. If it is, the flow ends, if it is not, the flow uses the Update User / Embedded Link / Verify Email action to generate a token for email verification. Make sure to check the Mark provided email as verified box.

Configure embedded link update user via email action within Descope flows

This is then passed into the send action for the SendGrid connector and included in the email using the {{embeddedTokenURI}} context key:

An example of a SendGrid connector being used to send an embedded link

SendGrid then sends the following email to the user:

An example of the email the connector would send to the user

Once the link in the email is clicked, the email is verified and the flow ends.

User page in the console after verification

For more information on how to use embedded links with Descope, visit the Embedded Links documentation section.

Was this helpful?

On this page