Skip to content

Commit 073cfc0

Browse files
Merge pull request #5355 from AfraHussaindeen/resend-account-confirmation-doc
Add documentation for supporting resending account verification email
2 parents 29992aa + 8aab8b4 commit 073cfc0

File tree

8 files changed

+127
-3
lines changed

8 files changed

+127
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
{% set host_name = "api.asgardeo.io/t/{organization_name}" %}
2+
{% set host_name_example = "api.asgardeo.io/t/bifrost" %}
3+
14
{% include "../../../../../includes/guides/account-configurations/user-onboarding/self-registration.md" %}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
{% set host_name = "localhost:9443" %}
2+
{% set host_name_example = "localhost:9443" %}
3+
14
{% include "../../../../../../includes/guides/account-configurations/user-onboarding/self-registration.md" %}

en/includes/guides/account-configurations/user-onboarding/self-registration.md

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,112 @@ Note the following details in the response payload:
171171
172172
- The `accountConfirmedTime` parameter will only be available under the same schema when email verification is successful for self-registered users.
173173
174-
Once you have identified the `emailVerified` status of the user and the method by which the user is onboarded (self-registration or onboarded by an administrator), you can enforce any access restrictions for that user through your application logic.
174+
Once you have identified the `emailVerified` status of the user and the method used to onboard the user (either through self-registration or by an administrator), you can enforce any access restrictions through your application logic.
175175
176+
{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version > "7.1.0" ) %}
177+
## Resend account verification email
178+
179+
!!! tip
180+
181+
To implement this scenario, you must enforce account verification for self-registered users and activate accounts immediately without waiting for verification.</br></br> Learn more in [enable/disable self-registration](#enabledisable-self-registration).
182+
183+
{% if product_name == "Asgardeo" %}
184+
- To resend the account verification email for the authenticated user, use the curl command shown below.
185+
{% else %}
186+
- To resend the account verification email for the authenticated user, use the [Self Resend Code API]({{base_path}}/apis/use-the-self-sign-up-rest-apis/#tag/Self-Register/paths/~1me~1resend-code/post) as shown below.
187+
{% endif %}
188+
189+
!!! abstract ""
190+
191+
=== "Request format"
192+
193+
```curl
194+
curl -X 'POST' \
195+
'https://{{ host_name }}/api/identity/user/v1.0/me/resend-code' \
196+
-H 'Authorization: Bearer <access_token>' \
197+
-H 'Content-Type: application/json' \
198+
-d '{
199+
"properties": [
200+
{
201+
"key": "RecoveryScenario",
202+
"value": "SELF_SIGN_UP"
203+
}
204+
]
205+
}'
206+
```
207+
=== "Sample request"
208+
209+
```curl
210+
curl -X 'POST' \
211+
'https://{{ host_name_example }}/api/identity/user/v1.0/me/resend-code' \
212+
-H 'Authorization: Bearer <access_token>' \
213+
-H 'Content-Type: application/json' \
214+
-d '{
215+
"properties": [
216+
{
217+
"key": "RecoveryScenario",
218+
"value": "SELF_SIGN_UP"
219+
}
220+
]
221+
}'
222+
```
223+
224+
---
225+
**Response**
226+
```
227+
HTTP/1.1 201 Created
228+
```
229+
230+
{% if product_name == "Asgardeo" %}
231+
- To resend the account verification email for other users, use the curl command shown below.
232+
{% else %}
233+
- To resend the account verification email for other users, use the [Resend Code API]({{base_path}}/apis/use-the-self-sign-up-rest-apis/#tag/Self-Register/paths/~1resend-code/post) as shown below.
234+
{% endif %}
235+
236+
!!! abstract ""
237+
238+
=== "Request format"
239+
240+
```curl
241+
curl -X 'POST' \
242+
'https://{{ host_name }}/api/identity/user/v1.0/resend-code' \
243+
-H 'Authorization: Bearer <access_token>' \
244+
-H 'Content-Type: application/json' \
245+
-d '{
246+
"user": {
247+
"username": "<USERNAME>",
248+
"realm": "<REALM>"
249+
},
250+
"properties": [{
251+
"key": "RecoveryScenario",
252+
"value": "SELF_SIGN_UP"
253+
}]
254+
}'
255+
```
256+
=== "Sample request"
257+
258+
```
259+
curl -X 'POST' \
260+
'https://{{ host_name_example }}/api/identity/user/v1.0/resend-code' \
261+
-H 'Authorization: Bearer <access_token>' \
262+
-H 'Content-Type: application/json' \
263+
-d '{
264+
"user": {
265+
"username": "bob",
266+
"realm": "PRIMARY"
267+
},
268+
"properties": [{
269+
"key": "RecoveryScenario",
270+
"value": "SELF_SIGN_UP"
271+
}]
272+
}'
273+
```
274+
275+
Ensure that the username provided is without the user store domain prefix, and the realm parameter specifies the relevant user store domain name.
276+
277+
---
278+
**Response**
279+
```
280+
"HTTP/1.1 201 Created"
281+
```
282+
{% endif %}

en/includes/guides/user-self-service/self-register.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ The user can follow the steps below to sign up using an email.
5555

5656
3. Click **Sign Up** to create the account.
5757

58-
4. If **Account Verification** is enabled, the user can confirm the account from the email.
58+
4. If **Account Verification** enabled, the user can confirm the account from the email.
5959

60-
![Account verification email notification]({{base_path}}/assets/img/guides/organization/self-service/customer/account-verification-email.png){: width="500" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
60+
![Account verification email notification]({{base_path}}/assets/img/guides/organization/self-service/customer/account-verification-email.png){: width="500" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
61+
62+
{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version > "7.1.0" ) %}
63+
5. If **Account Verification** enabled, users can resend the account verification email if needed.
64+
- If **Activate Account Immediately** enabled, after successfully logging into My Account, a warning message with a resend link will appear. Click this link to resend the account verification email.
65+
66+
![Immediate Activation Enabled Warning]({{base_path}}/assets/img/guides/organization/self-service/customer/resend-account-verification-email-immediate-account-activation-enabled.png){: width="600" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
67+
68+
- If **Activate Account Immediately** disabled, attempting to log in to **My Account**, will display a warning message indicating the account lacks activation, along with a resend link. Click this link to resend the account verification email.
69+
70+
![Immediate Activation Disabled Warning]({{base_path}}/assets/img/guides/organization/self-service/customer/resend-account-verification-email-immediate-account-activation-disabled.png){: width="400" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
71+
{% endif %}

0 commit comments

Comments
 (0)