-
Notifications
You must be signed in to change notification settings - Fork 5
fix: CORS issue with ORCID API and refactoring ORCID integration #1317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development #1317 +/- ##
=================================================
+ Coverage 56.63% 56.83% +0.20%
- Complexity 2268 2280 +12
=================================================
Files 207 208 +1
Lines 8733 8774 +41
=================================================
+ Hits 4946 4987 +41
Misses 3787 3787
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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 |
Key Changes: