Skip to content

Conversation

@asithade
Copy link
Contributor

This pull request makes a small update to the generateM2MToken utility function. The change simplifies how the tokenEndpoint URL is constructed by removing an unnecessary slash, which helps prevent double slashes in the final URL.

Signed-off-by: Asitha de Silva <asithade@gmail.com>
Copilot AI review requested due to automatic review settings September 12, 2025 00:45
@asithade asithade requested a review from jordane as a code owner September 12, 2025 00:45
@coderabbitai
Copy link

coderabbitai bot commented Sep 12, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Caution

Review failed

The pull request is closed.

Walkthrough

Replaced string interpolation with URL resolution for constructing the token endpoint in m2m-token.util.ts. All other logic, including request options, fetch invocation, error handling, and logging, remains unchanged.

Changes

Cohort / File(s) Summary
Token endpoint URL construction
apps/lfx-pcc/src/server/utils/m2m-token.util.ts
Build tokenEndpoint using new URL(config.endpoint, issuerBaseUrl).toString() instead of string interpolation; no other logic modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8a9d902 and 3dd4931.

📒 Files selected for processing (1)
  • apps/lfx-pcc/src/server/utils/m2m-token.util.ts (1 hunks)
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/auth0-token

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes URL construction in the M2M token generation endpoint by removing a hardcoded slash to prevent double slashes in the final URL.

  • Simplified URL concatenation logic in the generateM2MToken function
  • Changed from template literal with slash to direct string concatenation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

andrest50
andrest50 previously approved these changes Sep 12, 2025
Signed-off-by: Asitha de Silva <asithade@gmail.com>
@asithade asithade merged commit 7bb6acf into main Sep 12, 2025
6 checks passed
@asithade asithade deleted the fix/auth0-token branch September 12, 2025 00:48
@github-actions
Copy link

🧹 Deployment Removed

The deployment for PR #84 has been removed.

@github-actions
Copy link

github-actions bot commented Sep 12, 2025

✅ E2E Tests Passed

Browser: chromium
Status: passed

All E2E tests passed successfully.

Test Configuration

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