Skip to content

added realisation of password reset#325

Merged
L1ght1234 merged 7 commits into
devfrom
feat/310/password-reset
Jun 24, 2025
Merged

added realisation of password reset#325
L1ght1234 merged 7 commits into
devfrom
feat/310/password-reset

Conversation

@L1ght1234
Copy link
Copy Markdown
Contributor

@L1ght1234 L1ght1234 commented Jun 24, 2025

✅ Functionality overview:

Added two new API endpoints:

POST /api/account/forgot-password

  • Accepts an email address

  • Generates a secure reset token using Identity

  • Sends a reset link via email in the format:

https://localhost:5002/reset-password?token=&email=

POST /api/account/reset-password

  • Accepts token, email, and new password

  • Verifies token and resets the password via UserManager.ResetPasswordAsync

⚠️ Testing instructions (for development):

Since there is no frontend yet, follow these steps to test the reset:

Use Swagger or Postman to call:

POST /api/account/forgot-password
{
"email": "your_email@example.com"
}

You will receive a reset link via email (from the no-reply Gmail account).

Open the link, copy the token and email from the URL parameters.

Important:
The token in the URL is URL-encoded.
You must decode it before using in the next request.
Use this site to decode the token:
👉 https://www.urldecoder.org/

Call:

POST /api/account/reset-password
{
  "email": "your_email@example.com",
  "token": "decoded_token_here",
  "newPassword": "YourNewPassword123!"
}

CHECK LIST

  • СI passed
  • Сode coverage >=95%
  • PR is reviewed manually again (to make sure you have 100% ready code)
  • All reviewers agreed to merge the PR
  • I've checked new feature as logged in and logged out user if needed
  • PR meets all conventions

@L1ght1234 L1ght1234 self-assigned this Jun 24, 2025
@L1ght1234 L1ght1234 requested a review from a team June 24, 2025 17:46
Copy link
Copy Markdown
Collaborator

@KobMiles KobMiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 50%)

See analysis details on SonarQube Cloud

@L1ght1234 L1ght1234 merged commit f3909e2 into dev Jun 24, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure email sender service Create an ability to reset user's password

3 participants