Skip to content

fix: CORS issue with ORCID API and refactoring ORCID integration#1317

Merged
vcnainala merged 5 commits intodevelopmentfrom
issue-#1315
Jan 12, 2026
Merged

fix: CORS issue with ORCID API and refactoring ORCID integration#1317
vcnainala merged 5 commits intodevelopmentfrom
issue-#1315

Conversation

@NishaSharma14
Copy link
Copy Markdown
Contributor

@NishaSharma14 NishaSharma14 commented Dec 16, 2025

Key Changes:

  • Created a new backend proxy controller to handle ORCID API requests server-side
  • Refactored Vue components to use the new backend endpoints instead of direct ORCID API calls
  • Enhanced UI with loading states and improved error handling
  • Consolidated ORCID configuration into a dedicated config file

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.49%. Comparing base (1fa2b0d) to head (f99f7d4).
⚠️ Report is 1 commits behind head on development.

Additional details and impacted files
@@                Coverage Diff                @@
##             development    #1317      +/-   ##
=================================================
+ Coverage          63.32%   63.49%   +0.17%     
- Complexity          2273     2285      +12     
=================================================
  Files                208      209       +1     
  Lines               8780     8821      +41     
=================================================
+ Hits                5560     5601      +41     
  Misses              3220     3220              
Flag Coverage Δ
unittests 63.49% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

Copy link
Copy Markdown
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 CORS issues with the ORCID API by moving ORCID API calls from the frontend to the backend. It refactors the ORCID integration to proxy requests through a new Laravel controller instead of making direct API calls from Vue components.

Key Changes:

  • Created a new backend proxy controller to handle ORCID API requests server-side
  • Refactored Vue components to use the new backend endpoints instead of direct ORCID API calls
  • Enhanced UI with loading states and improved error handling
  • Consolidated ORCID configuration into a dedicated config file

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
routes/web.php Adds three new ORCID routes for search, person, and employment endpoints
app/Http/Controllers/OrcidController.php New controller that proxies requests to the ORCID API
config/orcid.php New configuration file for ORCID API URLs
resources/js/Shared/SelectOrcidId.vue Refactored to call backend endpoints, improved error handling and state management
resources/js/Pages/Console/Users/Partials/UserProfile.vue Added loading states and validation for ORCID search
resources/js/Pages/Auth/Register.vue Added loading states and validation for ORCID search
app/Support/Csp/Policies/NmrxivPolicy.php Removed ORCID from CSP since requests now go through backend
app/Http/Middleware/HandleInertiaRequests.php Removed ORCID API URLs from shared Inertia props
.env.example Consolidated three ORCID env vars into one base URL
.env.ci Consolidated three ORCID env vars into one base URL

Comment thread app/Http/Controllers/OrcidController.php
Comment thread app/Http/Controllers/OrcidController.php
Comment thread app/Http/Controllers/OrcidController.php
Comment thread config/orcid.php Outdated
Comment thread resources/js/Shared/SelectOrcidId.vue
Comment thread resources/js/Shared/SelectOrcidId.vue
Comment thread app/Http/Controllers/OrcidController.php
Comment thread app/Http/Controllers/OrcidController.php
Comment thread app/Http/Controllers/OrcidController.php
Comment thread app/Http/Controllers/OrcidController.php
@NishaSharma14 NishaSharma14 self-assigned this Dec 16, 2025
@vcnainala vcnainala merged commit 1d2d7b6 into development Jan 12, 2026
7 checks passed
@vcnainala vcnainala deleted the issue-#1315 branch January 12, 2026 12:31
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.

Fetch ORCID details service getting blocked by CSP.

3 participants