-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update email link custom flow guide #1433
base: main
Are you sure you want to change the base?
Conversation
Hey, here’s your docs preview: https://clerk.com/docs/pr/1433 |
@@ -125,7 +125,20 @@ If a country is disabled, then phone numbers starting with the corresponding cou | |||
|
|||
### Email link | |||
|
|||
When the **Email verification link** option is selected as an authentication strategy, users will receive an email message with a link that can be visited in order to complete the authentication process. Email links can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to their profile. Email links work on any device. There's no constraint on where the link will be opened. For example, a user might try to sign in from their desktop browser, but open the link from their mobile phone. | |||
When the **Email verification link** option is selected as an authentication strategy, users will receive an email message with a link that can be visited in order to complete the authentication process. Email links can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to their profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the **Email verification link** option is selected as an authentication strategy, users will receive an email message with a link that can be visited in order to complete the authentication process. Email links can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to their profile. | |
When the **Email verification link** option is selected as an authentication strategy, users receive an email message with a link to complete the authentication process. Email links can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to user profiles. |
When the **Email verification link** option is selected as an authentication strategy, users will receive an email message with a link that can be visited in order to complete the authentication process. Email links can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to their profile. Email links work on any device. There's no constraint on where the link will be opened. For example, a user might try to sign in from their desktop browser, but open the link from their mobile phone. | ||
When the **Email verification link** option is selected as an authentication strategy, users will receive an email message with a link that can be visited in order to complete the authentication process. Email links can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to their profile. | ||
|
||
As a security measure, email links expire after 10 minutes to prevent the use of potentially compromised stale links. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a security measure, email links expire after 10 minutes to prevent the use of potentially compromised stale links. | |
As a security measure, email links expire after 10 minutes prevent the use of compromised or stale links. |
1. Navigate to the [Clerk Dashboard](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username). | ||
1. In the navigation sidebar, select **User & Authentication > Email, Phone, and Username**. | ||
1. In the **Authentication strategies** section, next to **Email verification link**, select the settings cog icon. | ||
1. Enable or disable the **Require the same device and browser** setting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Navigate to the [Clerk Dashboard](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username). | |
1. In the navigation sidebar, select **User & Authentication > Email, Phone, and Username**. | |
1. In the **Authentication strategies** section, next to **Email verification link**, select the settings cog icon. | |
1. Enable or disable the **Require the same device and browser** setting. | |
1. In the [Clerk Dashboard](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username), navigate to the **User & Authentication > Email, Phone, and Username** page. | |
1. In the **Authentication strategies** section, next to **Email verification link**, select the settings cog icon. | |
1. Enable or disable the **Require the same device and browser** setting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we want to not use settings cog icon
?
|
||
#### Require the same device and browser | ||
|
||
By default, email links can work on any device. There's no constraint on where the link can be opened. For example, a user could try to sign in from their desktop browser, but open the link from their mobile phone. In this scenario, _the user's sign in would be completed on the desktop browser from which it was initiated, not the mobile phone where it was verified_. As a result, the user would be signed in on their desktop, not their phone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, email links can work on any device. There's no constraint on where the link can be opened. For example, a user could try to sign in from their desktop browser, but open the link from their mobile phone. In this scenario, _the user's sign in would be completed on the desktop browser from which it was initiated, not the mobile phone where it was verified_. As a result, the user would be signed in on their desktop, not their phone. | |
By default, email links can be opened on any device. There's no restriction on where the link can be accessed. For example, a user could try to sign in from their desktop browser but open the link from their mobile phone. In this case, _the user's sign in would be completed on the desktop browser where the process was initiated, not the mobile phone where the link was verified_. As a result, the user would be signed in on their desktop, not their phone. |
|
||
## Email link flow | ||
[Email links](/docs/authentication/configuration/sign-up-sign-in-options#email-link) can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to their profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Email links](/docs/authentication/configuration/sign-up-sign-in-options#email-link) can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to their profile. | |
[Email links](/docs/authentication/configuration/sign-up-sign-in-options#email-link) can be used to sign up new users, sign in existing ones, or allow existing users to verify newly entered email addresses to user profiles. |
1. Navigate to the [Clerk Dashboard](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username). | ||
1. In the navigation sidebar, select **User & Authentication > Email, Phone, and Username**. | ||
1. In the **Contact information** section, **Email address** should be enabled. | ||
1. In the **Username** section, ensure that **Username** is not required, or else the `create()` method will require a username to be passed in the params. If you would like to use usernames, you must handle collecting the username in your custom flow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. In the **Username** section, ensure that **Username** is not required, or else the `create()` method will require a username to be passed in the params. If you would like to use usernames, you must handle collecting the username in your custom flow. | |
1. In the **Username** section, ensure that **Username** is not required. Otherwise, the `create()` method will require a username to be passed in the params. If you want to use usernames, you must handle collect the username in your custom flow. |
1. In the **Contact information** section, **Email address** should be enabled. | ||
1. In the **Username** section, ensure that **Username** is not required, or else the `create()` method will require a username to be passed in the params. If you would like to use usernames, you must handle collecting the username in your custom flow. | ||
1. In the **Authentication strategies** section, toggle on **Email verification link**. | ||
1. Keep this page open as you will need to enable email link verification in the next step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Keep this page open as you will need to enable email link verification in the next step. | |
1. Keep this page open to enable email link verification in the next step. |
|
||
If you click on the **Settings cog** icon next to **Email address**, the email address configuration screen will pop open. You can toggle on **Require** if you want to make sure that all users have an email address associated with their profile. | ||
1. On this same page in the Clerk Dashboard, next to **Email address**, select the settings cog icon. A modal will open. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question for settings cog icon
.
|
||
If you click on the **Settings cog** icon next to **Email address**, the email address configuration screen will pop open. You can toggle on **Require** if you want to make sure that all users have an email address associated with their profile. | ||
1. On this same page in the Clerk Dashboard, next to **Email address**, select the settings cog icon. A modal will open. | ||
1. Under **Verification methods**, enable the **Email verification link** option. For the sake of this guide, uncheck the box for **Email verification code**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Under **Verification methods**, enable the **Email verification link** option. For the sake of this guide, uncheck the box for **Email verification code**. | |
1. Under **Verification methods**, enable the **Email verification link** option. For this guide, uncheck the box for **Email verification code**. |
|
||
> [!NOTE] | ||
> **Verification methods** are different from **Authentication strategies**. **Verification methods** are used for verifying a user's identifier, such as an email address upon initial sign-up or when updating their profile. **Authentication strategies** are used for authenticating a user, such as when they are signing in to your application. | ||
The flow for handling email links is the same across all scenarios. You must: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flow for handling email links is the same across all scenarios. You must: | |
The flow for handling email links is the same across all use cases. You must: |
Important
🔎 Previews:
Explanation:
https://linear.app/clerk/issue/DOCS-5240/httpsdocs-preview-702clerkpreviewcomdocscustom-flowsemail-links
This PR: