Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Gianluca-X/DigitalMoney/llms.txt

Use this file to discover all available pages before exploring further.

When a new user registers, the auth service generates a UUID verification code, persists it against the user record, and dispatches a verification email via the configured SMTP provider. Until the account is verified, any call to POST /auth/login returns 403 Forbidden. This page documents the GET /auth/verify endpoint and the end-to-end verification flow.

Endpoint

GET http://localhost:8085/auth/verify?code={code}
Authentication: None required.

Query Parameters

code
string
required
The UUID verification code received in the registration email. The service trims whitespace and strips surrounding quotes before lookup. Codes are single-use — once verified, the code is cleared from the database and cannot be reused.

Responses

200 OK

✅ Email verified successfully
The emailVerified flag on the user record is set to true and the stored verification code is nullified. The account is now active and the user may log in.

400 Bad Request

Código inválido o expirado
Returned when the code does not match any record in the database — either because it was typed incorrectly or the code has already been used.

Example

curl -X GET "http://localhost:8085/auth/verify?code=3f2504e0-4f89-11d3-9a0c-0305e82c3301"

Success response

✅ Email verified successfully

Error response

Código inválido o expirado

Verification Flow

1

Register an account

Call POST /users/register (or POST /auth/register directly) with a valid email and password. The auth service immediately sends a verification email to the supplied address.
2

Check your inbox

Open the email from Digital Money House. It contains a verification link and/or a raw UUID code in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
3

Submit the verification code

Call GET /auth/verify?code=your_code through the Gateway, substituting the exact UUID from the email.
curl -X GET "http://localhost:8085/auth/verify?code=3f2504e0-4f89-11d3-9a0c-0305e82c3301"
4

Confirm activation

A 200 OK response with the body ✅ Email verified successfully confirms the account is now active. The verification code is deleted from the database at this point.
5

Log in

Call POST /auth/login with your email and password to obtain a JWT Bearer token and begin using the API.
curl -X POST http://localhost:8085/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "ada@digitalmoney.io", "password": "S3cure!Pass"}'

Error Codes

HTTP StatusExceptionDescription
400 Bad RequestInvalidVerificationCodeExceptionThe supplied code does not match any pending verification record. The code may have already been used or may have been entered incorrectly.

Email Service Configuration

The development environment uses Gmail SMTP to deliver verification emails. Ensure the following environment variables are configured in the auth service before running locally:
  • MAIL_USERNAME — the Gmail address used as the sender.
  • MAIL_PASSWORD — a Gmail App Password (not your account password).
In production, replace these with your transactional email provider’s SMTP credentials and update the Spring Mail configuration in application.properties accordingly.

Build docs developers (and LLMs) love