Skip to content

Fix/22 mark current session correctly#51

Open
NirmalMishra08 wants to merge 11 commits into
roshankumar0036singh:mainfrom
NirmalMishra08:fix/22-mark-current-session-correctly
Open

Fix/22 mark current session correctly#51
NirmalMishra08 wants to merge 11 commits into
roshankumar0036singh:mainfrom
NirmalMishra08:fix/22-mark-current-session-correctly

Conversation

@NirmalMishra08
Copy link
Copy Markdown

Checklist

  • I have read and signed the CLA by commenting I have read the CLA and agree to its terms. on this PR.
  • My changes follow the project's coding style.
  • I have tested my changes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Warning

Review limit reached

@NirmalMishra08, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 1 second. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 15a4b34b-2913-4d5c-bda7-ebb4b92812a6

📥 Commits

Reviewing files that changed from the base of the PR and between de8755b and c79cb1b.

📒 Files selected for processing (10)
  • cmd/oauth-test-client/main.go
  • internal/config/redis.go
  • internal/handler/auth_handler.go
  • internal/handler/auth_handler_protected_test.go
  • internal/handler/auth_handler_test.go
  • internal/middleware/auth.go
  • internal/repository/token_repository.go
  • internal/service/auth_service.go
  • internal/service/token_service.go
  • internal/service/token_service_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2026

@NirmalMishra08
Copy link
Copy Markdown
Author

Hi @roshankumar0036singh,

I've addressed the review comments and pushed the updates.

Updated the session tests to verify that the session corresponding to the request token is marked as current.
Added test coverage for the case where sessionID is missing from the request context.
Removed the unused test variable.
Updated the refresh token rotation flow to use a transaction so the creation of the new refresh token and revocation of the old token happen atomically, avoiding inconsistent session state.

I've also run the tests locally and everything is passing. Could you please take another look when you have time? Thanks!

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.

1 participant