Skip to content

[Human App] Implement JWT authentication guard and strategy to validate the token - #3394

Merged
portuu3 merged 5 commits into
developfrom
feat/human-app/validate-jwt
Jun 26, 2025
Merged

[Human App] Implement JWT authentication guard and strategy to validate the token#3394
portuu3 merged 5 commits into
developfrom
feat/human-app/validate-jwt

Conversation

@flopez7

@flopez7 flopez7 commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

Issue tracking

#2673

Context behind the change

  • Added JwtAuthGuard to protect routes and handle JWT validation.
  • Created JwtHttpStrategy for extracting and validating JWT tokens.
  • Introduced RequestWithUser interface to standardize request objects with user data and token.
  • Updated various controllers to utilize the new JWT authentication mechanism, ensuring token extraction from requests.
  • Refactored existing endpoints to replace direct token handling with the new request structure.
  • Enhanced tests to accommodate changes in controller methods and request handling.
  • Updated jest.config.ts to improve test usage

How has this been tested?

Deployed locally, generated a new JWT and call some open and closed endpoints

Release plan

None

Potential risks; What to monitor; Rollback plan

Check if all jwt endpoints required still working.

… token

- Added JwtAuthGuard to protect routes and handle JWT validation.
- Created JwtHttpStrategy for extracting and validating JWT tokens.
- Introduced RequestWithUser interface to standardize request objects with user data and token.
- Updated various controllers to utilize the new JWT authentication mechanism, ensuring token extraction from requests.
- Refactored existing endpoints to replace direct token handling with the new request structure.
- Enhanced tests to accommodate changes in controller methods and request handling.
@vercel

vercel Bot commented Jun 16, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
faucet-frontend ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 6:51am
faucet-server ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2025 6:51am
human-app ⬜️ Skipped (Inspect) Jun 24, 2025 6:51am
human-dashboard-frontend ⬜️ Skipped (Inspect) Jun 24, 2025 6:51am
staking-dashboard ⬜️ Skipped (Inspect) Jun 24, 2025 6:51am

@flopez7
flopez7 requested review from Dzeranov and dnechay June 16, 2025 07:25
@flopez7 flopez7 self-assigned this Jun 16, 2025
@vercel
vercel Bot temporarily deployed to Preview – human-dashboard-frontend June 16, 2025 07:27 Inactive
@vercel
vercel Bot temporarily deployed to Preview – human-app June 16, 2025 07:27 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking-dashboard June 16, 2025 07:27 Inactive
Comment thread packages/apps/human-app/server/src/modules/user-operator/operator.controller.ts Outdated
Comment thread packages/apps/human-app/server/src/main.ts Outdated
Comment thread packages/apps/human-app/server/src/common/guards/strategy/jwt.http.ts Outdated
Comment thread packages/apps/human-app/server/src/common/guards/strategy/jwt.http.ts Outdated
Comment thread packages/apps/human-app/server/src/common/guards/jwt.auth.ts
@vercel
vercel Bot temporarily deployed to Preview – human-app June 23, 2025 14:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – human-dashboard-frontend June 23, 2025 14:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking-dashboard June 23, 2025 14:45 Inactive
dnechay
dnechay previously approved these changes Jun 23, 2025
@dnechay
dnechay dismissed their stale review June 23, 2025 16:00

Changes LGTM, but please check failing tests

@vercel
vercel Bot temporarily deployed to Preview – human-app June 24, 2025 06:51 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking-dashboard June 24, 2025 06:51 Inactive
@vercel
vercel Bot temporarily deployed to Preview – human-dashboard-frontend June 24, 2025 06:51 Inactive
@flopez7
flopez7 requested a review from dnechay June 24, 2025 10:03
@portuu3
portuu3 merged commit 0f78b3c into develop Jun 26, 2025
8 checks passed
@portuu3 portuu3 mentioned this pull request Jun 26, 2025
16 tasks
@dnechay
dnechay deleted the feat/human-app/validate-jwt branch July 30, 2025 13:41
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.

3 participants