Skip to content

Varkopat/enhancement/685/enhance auth api with refresh endpoint and investigate middleware integration - #690

Open
Varkopat wants to merge 2 commits into
devfrom
Varkopat/enhancement/685-enhance-auth-api-with-refresh-endpoint-and-investigate-middleware-integration
Open

Varkopat wants to merge 2 commits into
devfrom
Varkopat/enhancement/685-enhance-auth-api-with-refresh-endpoint-and-investigate-middleware-integration

Conversation

@Varkopat

Copy link
Copy Markdown

📄 Pull Request Overview

Closes #685

🔧 Changes Made

  1. [Briefly describe changes you made]
  • Auth Refresh Functionality:

  • Implemented AuthRefreshTest component for manual testing of auth refresh.

  • Integrated useRefreshAuthMutation in authApi and exposed it.

  • Added and exported IRefreshAuthDto.

  • Updated refreshAuth to require { refreshToken } in the request body per Swagger specifications.

  • Updated AccessTokenInfoResponse to include both accessToken and refreshToken.

  • Test Panels & UI:

  • Updated the admin test panel with a required refresh-token input.

  • Disabled the refresh button until a token is entered.

  • Created tests for the refreshAuth mutation and React hook.

  • Documentation & Validation:

  • Added and updated the README for authentication refresh investigation detailing current implementation and middleware findings.

  • Passed all local validations, including Auth API tests, TypeScript diagnostics, Prettier, and git diff --check.

✅ Checklist Before Submission

  • Functionality: I have tested my code, and it works as expected.
  • JSDoc: I have added or updated JSDoc comments for all relevant code.
  • Debugging: No console.log() or other debugging statements are left.
  • Clean Code: Removed commented-out or unnecessary code.
  • Tests: Added new tests or updated existing ones for the changes made.
  • Documentation: Documentation has been updated (if applicable).

📝 Additional Information

Provide any additional context or information that reviewers may need to know:

  • Screenshots: [Include any screenshots or videos if the changes affect the UI]
  • Dependencies: [Mention any new dependencies or breaking changes]
  • Known Issues: [List any known issues or limitations]

- Implement AuthRefreshTest component for manual testing of auth refresh
- Integrate useRefreshAuthMutation in authApi and expose it
- Add README for authentication refresh investigation detailing current implementation and middleware findings
- Create tests for the refreshAuth mutation and React hook
- refreshAuth now requires { refreshToken } in the request body.

- AccessTokenInfoResponse now includes both accessToken and refreshToken.

- Added and exported IRefreshAuthDto.

- Updated the admin test panel with a required refresh-token input.

- Disabled the refresh button until a token is entered.

- Updated the middleware investigation documentation.

Validation passed:

- Auth API test passed

- TypeScript diagnostics passed for changed files

- Prettier passed

- git diff --check passed
@codecov-alt

codecov-alt Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 3.44828% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
[...ng]/(helper)/admin/_components/AuthRefreshTest.tsx](https://yrfbcpxonsco.mikhail.com.de/gh/Alt-Org/Altzone-WebPages/pull/690?src=pr&el=tree&filepath=frontend-next-migration%2Fsrc%2Fapp%2F%5Blng%5D%2F%28helper%29%2Fadmin%2F_components%2FAuthRefreshTest.tsx#diff-ZnJvbnRlbmQtbmV4dC1taWdyYXRpb24vc3JjL2FwcC9bbG5nXS8oaGVscGVyKS9hZG1pbi9fY29tcG9uZW50cy9BdXRoUmVmcmVzaFRlc3QudHN4) 0.00% 25 Missing ⚠️
...xt-migration/src/app/[lng]/(helper)/admin/page.tsx 0.00% 1 Missing ⚠️
frontend-next-migration/src/entities/Auth/index.ts 0.00% 1 Missing ⚠️
...-next-migration/src/entities/Auth/model/authApi.ts 50.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
...xt-migration/src/app/[lng]/(helper)/admin/page.tsx 0.00% <0.00%> (ø)
frontend-next-migration/src/entities/Auth/index.ts 35.00% <0.00%> (-1.85%) ⬇️
...-next-migration/src/entities/Auth/model/authApi.ts 46.15% <50.00%> (+9.79%) ⬆️
[...ng]/(helper)/admin/_components/AuthRefreshTest.tsx](https://yrfbcpxonsco.mikhail.com.de/gh/Alt-Org/Altzone-WebPages/pull/690?src=pr&el=tree&filepath=frontend-next-migration%2Fsrc%2Fapp%2F%5Blng%5D%2F%28helper%29%2Fadmin%2F_components%2FAuthRefreshTest.tsx#diff-ZnJvbnRlbmQtbmV4dC1taWdyYXRpb24vc3JjL2FwcC9bbG5nXS8oaGVscGVyKS9hZG1pbi9fY29tcG9uZW50cy9BdXRoUmVmcmVzaFRlc3QudHN4) 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Enhance Auth API with Refresh Endpoint and Investigate Middleware Integration

1 participant