feat: implement email verification and password reset features

- Add EmailTokenService for handling email verification and password reset tokens.
- Create EmailService for sending verification and reset emails via SMTP.
- Update AuthService to handle email verification status during login.
- Modify user registration to redirect to a check email screen instead of issuing a token.
- Implement resend verification email functionality.
- Add deep link handling for email verification and password reset in the mobile app.
- Update mobile app routes and components to support new email verification flow.
- Enhance error handling for unverified emails during login attempts.
- Update configuration to include SMTP settings for email service.
This commit is contained in:
2026-03-14 23:38:15 -03:00
parent f5f4e878b4
commit d5af338ee1
38 changed files with 1146 additions and 75 deletions
@@ -1,7 +1,7 @@
info:
name: Forgot Password
type: http
seq: 5
seq: 6
http:
method: POST
@@ -14,6 +14,13 @@ http:
"password": "12345678"
}
script:
res: |
if (res.status === 200) {
bru.setEnvVar("access_token", res.getBody().access_token);
bru.setEnvVar("refresh_token", res.getBody().refresh_token);
}
settings:
encodeUrl: true
timeout: 0
@@ -1,18 +1,11 @@
info:
name: Logout
type: http
seq: 2
seq: 5
http:
method: POST
url: "{{base_url}}/api/v1/auth/logout"
body:
type: json
data: |-
{
"email": "felipe@felipecncloud.com",
"password": "l11f06c10"
}
auth:
type: bearer
token: "{{access_token}}"
@@ -1,7 +1,7 @@
info:
name: OAuth Google
type: http
seq: 8
seq: 3
http:
method: POST
@@ -13,6 +13,13 @@ http:
"id_token": "{{google_id_token}}"
}
script:
res: |
if (res.status === 200) {
bru.setEnvVar("access_token", res.getBody().access_token);
bru.setEnvVar("refresh_token", res.getBody().refresh_token);
}
settings:
encodeUrl: true
timeout: 0
@@ -13,6 +13,13 @@ http:
"refresh_token": "{{refresh_token}}"
}
script:
res: |
if (res.status === 200) {
bru.setEnvVar("access_token", res.getBody().access_token);
bru.setEnvVar("refresh_token", res.getBody().refresh_token);
}
settings:
encodeUrl: true
timeout: 0
@@ -10,7 +10,7 @@ http:
type: json
data: |-
{
"email": "felipe@felipecncloud.com",
"email": "felipecaninn18@gmail.com",
"password": "12345678"
}
@@ -1,7 +1,7 @@
info:
name: Reset Password
type: http
seq: 7
seq: 8
http:
method: POST
@@ -1,7 +1,7 @@
info:
name: Verify Email
type: http
seq: 6
seq: 7
http:
method: POST
@@ -10,16 +10,16 @@ http:
type: json
data: |-
{
"material": "PLA",
"brand": "Bambu",
"model": "PLA Basic",
"material": "PETG",
"brand": "Elegoo",
"model": "Rapid",
"color_hex": "#FF5733",
"spool_preset_id": "{{preset_id}}",
"total_weight_g": 1250,
"temp_hotend_c": 220,
"temp_bed_c": 60,
"flow_factor_pct": 1.0,
"notes": "Filamento de teste"
"total_weight_g": 527,
"temp_hotend_c": 250,
"temp_bed_c": 70,
"flow_factor_pct": 0.0033,
"notes": "Filamento"
}
auth:
type: bearer
@@ -0,0 +1,17 @@
info:
name: Delete Me
type: http
seq: 3
http:
method: DELETE
url: "{{base_url}}/api/v1/users/me"
auth:
type: bearer
token: "{{access_token}}"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
@@ -10,3 +10,9 @@ variables:
value: 07188f3b-2b74-4251-88bc-037de7628d65
- name: filament_id
value: ""
- name: google_id_token
value: ""
- name: email_verify_token
value: 0351fde6cc2546499c2910fe109528fc
- name: reset_token
value: ""