Skip to content

Changed ROBLOX redirect URI to a more automatic manner#171

Merged
breadddevv merged 2 commits into
mainfrom
change/redirect
Jul 15, 2026
Merged

Changed ROBLOX redirect URI to a more automatic manner#171
breadddevv merged 2 commits into
mainfrom
change/redirect

Conversation

@breadddevv

@breadddevv breadddevv commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Updated Roblox sign-in configuration to consistently derive the callback address from the application’s configured URL.
    • Improved compatibility between instance settings and the OAuth configuration flow when environment-based settings are enabled.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@breadddevv, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 21cb765a-1ff6-41a1-862f-ff7d5a03d137

📥 Commits

Reviewing files that changed from the base of the PR and between ad82893 and c2e6061.

📒 Files selected for processing (2)
  • pages/api/auth/roblox/callback.ts
  • pages/api/auth/roblox/start.ts
📝 Walkthrough

Walkthrough

The admin configuration endpoint now derives the Roblox callback URI from NEXTAUTH_URL or PUBLIC_URL, returns it as redirectUri, and the frontend consumes that field during OAuth configuration loading.

Changes

Roblox redirect URI alignment

Layer / File(s) Summary
Admin redirect URI derivation and response
pages/api/admin/instance-config.ts
The endpoint derives the callback URI from environment-based public URLs and exposes it as redirectUri.
Frontend redirect URI wiring
pages/index.tsx
OAuth configuration loading reads response.data.redirectUri while retaining the automatic URI fallback.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: brennanpeters

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change by describing the more automatic Roblox redirect URI handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch change/redirect

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pages/api/admin/instance-config.ts (1)

39-49: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use one redirect URI field for every configuration path.

The API returns redirectUri only for environment-backed configuration, while the database-backed branch still returns robloxRedirectUri. Consequently, the frontend ignores the stored redirect URI and falls back to the browser origin.

  • pages/api/admin/instance-config.ts#L39-L49: return redirectUri: configMap.robloxRedirectUri || '' from the database-backed response as well.
  • pages/index.tsx#L344-L344: consume the unified redirectUri field after the API contract is corrected.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pages/api/admin/instance-config.ts` around lines 39 - 49, The database-backed
response in pages/api/admin/instance-config.ts must expose the redirect URI
through the unified redirectUri field, using configMap.robloxRedirectUri or an
empty string; update pages/index.tsx to consume redirectUri consistently instead
of the legacy field.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pages/api/admin/instance-config.ts`:
- Around line 25-26: Update the OAuth handlers in roblox start and callback to
use the same NEXTAUTH_URL/PUBLIC_URL-derived callback URI fallback when
ROBLOX_REDIRECT_URI and the database robloxRedirectUri are absent. Keep the
fallback expression consistent across both handlers and preserve matching
GET/POST environment detection so authorization and token exchange use the
identical redirect_uri.

---

Outside diff comments:
In `@pages/api/admin/instance-config.ts`:
- Around line 39-49: The database-backed response in
pages/api/admin/instance-config.ts must expose the redirect URI through the
unified redirectUri field, using configMap.robloxRedirectUri or an empty string;
update pages/index.tsx to consume redirectUri consistently instead of the legacy
field.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 37b4db60-9e60-4219-8235-7d4dbec7aae9

📥 Commits

Reviewing files that changed from the base of the PR and between 4bc2d35 and ad82893.

📒 Files selected for processing (2)
  • pages/api/admin/instance-config.ts
  • pages/index.tsx

Comment thread pages/api/admin/instance-config.ts
@breadddevv breadddevv merged commit 031a26c into main Jul 15, 2026
5 checks passed
@breadddevv breadddevv deleted the change/redirect branch July 15, 2026 14:22
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