fix: address remaining CodeRabbit review issues in backend#25
Merged
fix: address remaining CodeRabbit review issues in backend#25
Conversation
Co-authored-by: jaseel0 <225665919+jaseel0@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement core backend logic for improved authentication and database
fix: address remaining CodeRabbit review issues in backend
Mar 15, 2026
jaseel0
approved these changes
Mar 15, 2026
naheel0
approved these changes
Mar 15, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Four issues flagged by CodeRabbit remained unresolved: JWT encoding mismatch between
Program.csandAuthController, missingGitHubIdunique index in the initial migration, and misleading success response when a user record is missing during quest submission.Changes
Program.cs— ChangedEncoding.ASCII→Encoding.UTF8for JWT signing key bytes to matchAuthController.cs. Mismatched encodings cause silent token validation failures for any key with non-ASCII characters.InitialCreate.csmigration — ChangedGitHubIdcolumn type fromnvarchar(max)tonvarchar(450)and addedIX_Users_GitHubIdunique index directly in the initial schema.GitHubIdis the stable external identity;GitHubUsernameis mutable and insufficient as the sole uniqueness constraint.AddUniqueConstraints.csmigration — Removed now-redundantAlterColumnforGitHubIdandCreateIndex/DropIndexforIX_Users_GitHubIdsince these are handled inInitialCreate.IssuesController.cs—SubmitQuest— Return404immediately when the user record is not found, rather than silently skipping XP/streak updates and returning a misleading"XP Awarded!"withtotalXp: null.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.