-
Couldn't load subscription status.
- Fork 0
feat(auth): implementar fluxo completo de recuperação e redefinição d… #259
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
Open
luscas18
wants to merge
8
commits into
development
Choose a base branch
from
224-implementar-recuperaçao-de-senha
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
The head ref may contain hidden characters: "224-implementar-recupera\u00E7ao-de-senha"
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ec6089a
feat(auth): implementar fluxo completo de recuperação e redefinição d…
luscas18 8709bb1
Merge branch 'development' into 224-implementar-recuperaçao-de-senha
luscas18 68b3988
Fix: Atualizando erros de nomeclatura lint
luscas18 c3e9d46
Merge branch '224-implementar-recuperaçao-de-senha' of https://github…
luscas18 51f73b5
Fix: Atualizando conflitos development
luscas18 c83d0f3
Merge branch 'development' into 224-implementar-recuperaçao-de-senha
luscas18 77a5608
fix: Atualizando conflito com a development
luscas18 5fe30f5
fix: Atualizando conflito com a development
luscas18 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,26 @@ | ||
| TZ=UTC | ||
| PORT=3000 | ||
| NODE_ENV=development | ||
|
|
||
| STORAGE_PATH=./uploads | ||
|
|
||
| MYSQL_DATABASE=herbario_dev | ||
| MYSQL_HOST=127.0.0.1 | ||
| MYSQL_PORT=3306 | ||
| MYSQL_USERNAME=root | ||
| MYSQL_PASSWORD=masterkey | ||
|
|
||
| MYSQL_MIGRATION_USERNAME=root | ||
| MYSQL_MIGRATION_PASSWORD=masterkey | ||
|
|
||
| RECAPTCHA_SECRET_KEY=6LcYYYYYYYYYYYYYY | ||
|
|
||
| JWT_SECRET=your-jwt-secret-here | ||
| TZ=UTC | ||
| PORT=3000 | ||
| NODE_ENV=development | ||
|
|
||
| STORAGE_PATH=./uploads | ||
|
|
||
| MYSQL_DATABASE=herbario_dev | ||
| MYSQL_HOST=127.0.0.1 | ||
| MYSQL_PORT=3306 | ||
| MYSQL_USERNAME=root | ||
| MYSQL_PASSWORD=masterkey | ||
|
|
||
| MYSQL_MIGRATION_USERNAME=root | ||
| MYSQL_MIGRATION_PASSWORD=masterkey | ||
|
|
||
| RECAPTCHA_SECRET_KEY=6LcYYYYYYYYYYYYYY | ||
|
|
||
| JWT_SECRET=your-jwt-secret-here | ||
|
|
||
| SMTP_HOST=smtp.gmail.com | ||
| SMTP_PORT=587 | ||
| SMTP_USER="seu-email@gmail.com" | ||
| SMTP_PASS="sua-senha-de-app-de-16-digitos" | ||
| SMTP_FROM="Sistema HCF <no-reply@hcf.com>" | ||
|
|
||
| URL_PAINEL=http://localhost:5173/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| npm run lint | ||
| npm run lint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,94 +1,95 @@ | ||
| { | ||
| "name": "hcf-api", | ||
| "version": "0.1.1", | ||
| "description": "Projeto para construção da API para o sistema do Herbário da UTFPR", | ||
| "main": "dist/app/index.js", | ||
| "author": "Elaine Sangali <e.nani@gmail.com>", | ||
| "license": "MIT", | ||
| "private": true, | ||
| "engines": { | ||
| "node": "^22" | ||
| }, | ||
| "scripts": { | ||
| "migration:create": "tsx --env-file=.env src/database/cli.ts migration:create", | ||
| "migration:apply": "tsx --env-file=.env src/database/cli.ts migration:apply", | ||
| "lint:typescript": "tsc --noEmit", | ||
| "lint:eslint": "eslint --cache --fix --ext '.js,.ts,.tsx' .", | ||
| "lint": "run-p lint:typescript lint:eslint", | ||
| "clean": "rimraf dist", | ||
| "build:app": "babel -d ./dist -x '.js,.ts,.tsx' --copy-files --no-copy-ignored ./src", | ||
| "start": "nodemon --ext 'js,ts,tsx' --exec babel-node --extensions '.js,.ts,.tsx' ./src/index.js", | ||
| "build": "run-s clean build:app", | ||
| "test": "jest", | ||
| "prepare": "husky", | ||
| "audit": "npm audit --audit-level=moderate", | ||
| "audit:fix": "npm audit fix" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/cli": "7.27.0", | ||
| "@babel/core": "7.26.10", | ||
| "@babel/node": "7.26.0", | ||
| "@babel/plugin-proposal-class-properties": "7.18.6", | ||
| "@babel/preset-env": "7.22.10", | ||
| "@babel/preset-react": "7.26.3", | ||
| "@babel/preset-typescript": "7.22.15", | ||
| "@types/express": "5.0.1", | ||
| "@types/jest": "30.0.0", | ||
| "@types/react": "19.1.0", | ||
| "@types/react-dom": "19.1.1", | ||
| "@typescript-eslint/eslint-plugin": "6.7.0", | ||
| "@typescript-eslint/parser": "6.7.0", | ||
| "babel-plugin-module-resolver": "5.0.0", | ||
| "chai": "4.1.2", | ||
| "chai-http": "^4.0.0", | ||
| "eslint": "8.49.0", | ||
| "eslint-config-airbnb-base": "15.0.0", | ||
| "eslint-config-airbnb-typescript": "17.1.0", | ||
| "eslint-import-resolver-typescript": "3.6.0", | ||
| "eslint-plugin-import": "2.28.1", | ||
| "eslint-plugin-import-helpers": "1.3.1", | ||
| "husky": "9.1.7", | ||
| "jest": "29.7.0", | ||
| "nodemon": "3.1.9", | ||
| "npm-run-all": "4.1.5", | ||
| "typescript": "5.8.3" | ||
| }, | ||
| "dependencies": { | ||
| "axios": "^1.10.0", | ||
| "bcrypt": "5.1.1", | ||
| "bluebird": "3.7.2", | ||
| "body-parser": "2.2.0", | ||
| "commander": "13.1.0", | ||
| "cors": "2.8.5", | ||
| "date-fns": "4.1.0", | ||
| "dotenv": "16.3.1", | ||
| "ejs": "^2.6.1", | ||
| "express": "5.1.0", | ||
| "express-validator": "7.2.1", | ||
| "fast-csv": "^5.0.5", | ||
| "handlebars": "^4.7.8", | ||
| "helmet": "^8.0.0", | ||
| "jsonwebtoken": "9.0.2", | ||
| "express-rate-limit": "^7.4.1", | ||
| "knex": "2.5.1", | ||
| "moment": "^2.24.0", | ||
| "moment-timezone": "^0.5.21", | ||
| "morgan": "1.10.0", | ||
| "multer": "1.4.5-lts.2", | ||
| "mysql2": "3.14.0", | ||
| "node-wkhtmltopdf": "^2.0.0", | ||
| "puppeteer": "24.6.0", | ||
| "q": "^1.5.1", | ||
| "react": "19.1.0", | ||
| "react-dom": "19.1.0", | ||
| "request": "^2.88.0", | ||
| "sequelize": "^4.38.0", | ||
| "swagger-jsdoc": "^6.2.8", | ||
| "swagger-ui-express": "^5.0.1", | ||
| "throttled-queue": "^1.0.5", | ||
| "tsx": "4.19.3", | ||
| "uuid": "11.1.0", | ||
| "wkhtmltopdf": "^0.4.0" | ||
| }, | ||
| "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
| { | ||
| "name": "hcf-api", | ||
| "version": "0.1.1", | ||
| "description": "Projeto para construção da API para o sistema do Herbário da UTFPR", | ||
| "main": "dist/app/index.js", | ||
| "author": "Elaine Sangali <e.nani@gmail.com>", | ||
| "license": "MIT", | ||
| "private": true, | ||
| "engines": { | ||
| "node": "^22" | ||
| }, | ||
| "scripts": { | ||
| "migration:create": "tsx --env-file=.env src/database/cli.ts migration:create", | ||
| "migration:apply": "tsx --env-file=.env src/database/cli.ts migration:apply", | ||
| "lint:typescript": "tsc --noEmit", | ||
| "lint:eslint": "eslint --cache --fix --ext '.js,.ts,.tsx' .", | ||
| "lint": "run-p lint:typescript lint:eslint", | ||
| "clean": "rimraf dist", | ||
| "build:app": "babel -d ./dist -x '.js,.ts,.tsx' --copy-files --no-copy-ignored ./src", | ||
| "start": "nodemon --ext 'js,ts,tsx' --exec babel-node --extensions '.js,.ts,.tsx' ./src/index.js", | ||
| "build": "run-s clean build:app", | ||
| "test": "jest", | ||
| "prepare": "husky", | ||
| "audit": "npm audit --audit-level=moderate", | ||
| "audit:fix": "npm audit fix" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/cli": "7.27.0", | ||
| "@babel/core": "7.26.10", | ||
| "@babel/node": "7.26.0", | ||
| "@babel/plugin-proposal-class-properties": "7.18.6", | ||
| "@babel/preset-env": "7.22.10", | ||
| "@babel/preset-react": "7.26.3", | ||
| "@babel/preset-typescript": "7.22.15", | ||
| "@types/express": "5.0.1", | ||
| "@types/jest": "30.0.0", | ||
| "@types/react": "19.1.0", | ||
| "@types/react-dom": "19.1.1", | ||
| "@typescript-eslint/eslint-plugin": "6.7.0", | ||
| "@typescript-eslint/parser": "6.7.0", | ||
| "babel-plugin-module-resolver": "5.0.0", | ||
| "chai": "4.1.2", | ||
| "chai-http": "^4.0.0", | ||
| "eslint": "8.49.0", | ||
| "eslint-config-airbnb-base": "15.0.0", | ||
| "eslint-config-airbnb-typescript": "17.1.0", | ||
| "eslint-import-resolver-typescript": "3.6.0", | ||
| "eslint-plugin-import": "2.28.1", | ||
| "eslint-plugin-import-helpers": "1.3.1", | ||
| "husky": "9.1.7", | ||
| "jest": "29.7.0", | ||
| "nodemon": "3.1.9", | ||
| "npm-run-all": "4.1.5", | ||
| "typescript": "5.8.3" | ||
| }, | ||
| "dependencies": { | ||
| "axios": "^1.10.0", | ||
| "bcrypt": "5.1.1", | ||
| "bluebird": "3.7.2", | ||
| "body-parser": "2.2.0", | ||
| "commander": "13.1.0", | ||
| "cors": "2.8.5", | ||
| "date-fns": "4.1.0", | ||
| "dotenv": "16.3.1", | ||
| "ejs": "^2.6.1", | ||
| "express": "5.1.0", | ||
| "express-validator": "7.2.1", | ||
| "fast-csv": "^5.0.5", | ||
| "handlebars": "^4.7.8", | ||
| "helmet": "^8.0.0", | ||
| "jsonwebtoken": "9.0.2", | ||
| "express-rate-limit": "^7.4.1", | ||
| "knex": "2.5.1", | ||
| "moment": "^2.24.0", | ||
| "moment-timezone": "^0.5.21", | ||
| "morgan": "1.10.0", | ||
| "multer": "1.4.5-lts.2", | ||
| "mysql2": "3.14.0", | ||
| "node-wkhtmltopdf": "^2.0.0", | ||
| "nodemailer": "^7.0.9", | ||
| "puppeteer": "24.6.0", | ||
| "q": "^1.5.1", | ||
| "react": "19.1.0", | ||
| "react-dom": "19.1.0", | ||
| "request": "^2.88.0", | ||
| "sequelize": "^4.38.0", | ||
| "swagger-jsdoc": "^6.2.8", | ||
| "swagger-ui-express": "^5.0.1", | ||
| "throttled-queue": "^1.0.5", | ||
| "tsx": "4.19.3", | ||
| "uuid": "11.1.0", | ||
| "wkhtmltopdf": "^0.4.0" | ||
| }, | ||
| "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,36 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
| set -o pipefail | ||
|
|
||
| EXCLUDE_PARAMS="" | ||
| if [ -n "$SYNC_EXCLUDE_TABLES" ]; then | ||
| IFS=',' read -ra TABLES <<< "$SYNC_EXCLUDE_TABLES" | ||
| for table in "${TABLES[@]}"; do | ||
| table=$(echo "$table" | xargs) # trim whitespace | ||
| if [ -n "$table" ]; then | ||
| EXCLUDE_PARAMS="$EXCLUDE_PARAMS --ignore-table=${SYNC_SOURCE_DATABASE}.${table}" | ||
| fi | ||
| done | ||
| echo "Excluding tables: $SYNC_EXCLUDE_TABLES" | ||
| fi | ||
|
|
||
| echo "Starting synchronization process..." | ||
|
|
||
| mysqldump \ | ||
| -h "$SYNC_SOURCE_HOST" \ | ||
| -P "$SYNC_SOURCE_PORT" \ | ||
| -u "$SYNC_SOURCE_USER" \ | ||
| ${SYNC_SOURCE_PASSWORD:+-p"$SYNC_SOURCE_PASSWORD"} \ | ||
| $EXCLUDE_PARAMS \ | ||
| --single-transaction \ | ||
| "$SYNC_SOURCE_DATABASE" | \ | ||
| mysql \ | ||
| -h "$SYNC_DEST_HOST" \ | ||
| -P "$SYNC_DEST_PORT" \ | ||
| -u "$SYNC_DEST_USER" \ | ||
| ${SYNC_DEST_PASSWORD:+-p"$SYNC_DEST_PASSWORD"} \ | ||
| "$SYNC_DEST_DATABASE" | ||
|
|
||
|
|
||
| echo "Synchronization completed successfully: ${SYNC_SOURCE_DATABASE} -> ${SYNC_DEST_DATABASE}" | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
| set -o pipefail | ||
|
|
||
| EXCLUDE_PARAMS="" | ||
| if [ -n "$SYNC_EXCLUDE_TABLES" ]; then | ||
| IFS=',' read -ra TABLES <<< "$SYNC_EXCLUDE_TABLES" | ||
| for table in "${TABLES[@]}"; do | ||
| table=$(echo "$table" | xargs) # trim whitespace | ||
| if [ -n "$table" ]; then | ||
| EXCLUDE_PARAMS="$EXCLUDE_PARAMS --ignore-table=${SYNC_SOURCE_DATABASE}.${table}" | ||
| fi | ||
| done | ||
| echo "Excluding tables: $SYNC_EXCLUDE_TABLES" | ||
| fi | ||
|
|
||
| echo "Starting synchronization process..." | ||
|
|
||
| mysqldump \ | ||
| -h "$SYNC_SOURCE_HOST" \ | ||
| -P "$SYNC_SOURCE_PORT" \ | ||
| -u "$SYNC_SOURCE_USER" \ | ||
| ${SYNC_SOURCE_PASSWORD:+-p"$SYNC_SOURCE_PASSWORD"} \ | ||
| $EXCLUDE_PARAMS \ | ||
| --single-transaction \ | ||
| "$SYNC_SOURCE_DATABASE" | \ | ||
| mysql \ | ||
| -h "$SYNC_DEST_HOST" \ | ||
| -P "$SYNC_DEST_PORT" \ | ||
| -u "$SYNC_DEST_USER" \ | ||
| ${SYNC_DEST_PASSWORD:+-p"$SYNC_DEST_PASSWORD"} \ | ||
| "$SYNC_DEST_DATABASE" | ||
|
|
||
|
|
||
| echo "Synchronization completed successfully: ${SYNC_SOURCE_DATABASE} -> ${SYNC_DEST_DATABASE}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| #!/bin/sh | ||
|
|
||
| echo "Configuring cron job with schedule: $CRON_SCHEDULE (timezone: $TZ)" | ||
|
|
||
| # ensure environment variables are passed to the cron job | ||
| printenv | grep -E "^SYNC_" >> /etc/environment | ||
|
|
||
| echo "$CRON_SCHEDULE /database-sync.sh 1> /proc/1/fd/1 2> /proc/1/fd/2" | crontab - | ||
|
|
||
| if ! crontab -l >/dev/null 2>&1; then | ||
| echo "Failed to configure cron job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| crontab -l | ||
|
|
||
| exec $@ | ||
| #!/bin/sh | ||
| echo "Configuring cron job with schedule: $CRON_SCHEDULE (timezone: $TZ)" | ||
| # ensure environment variables are passed to the cron job | ||
| printenv | grep -E "^SYNC_" >> /etc/environment | ||
| echo "$CRON_SCHEDULE /database-sync.sh 1> /proc/1/fd/1 2> /proc/1/fd/2" | crontab - | ||
| if ! crontab -l >/dev/null 2>&1; then | ||
| echo "Failed to configure cron job" | ||
| exit 1 | ||
| fi | ||
| crontab -l | ||
| exec $@ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.