-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add orcid extension #25005
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: main
Are you sure you want to change the base?
Add orcid extension #25005
Conversation
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile OverviewGreptile SummaryThis PR adds a new ORCID extension enabling researchers to access their ORCID profiles and search for other researchers directly from Raycast. The extension properly removed the manual Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
|
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.
3 files reviewed, 3 comments
- fix: use title-case for action, resize screenshots to 2000x1250 - fix: address review feedback
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.
3 files reviewed, 3 comments
| const response = await fetch(`${getAuthBaseUrl()}/oauth/token`, { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/x-www-form-urlencoded", | ||
| Accept: "application/json", | ||
| }, | ||
| body: new URLSearchParams({ | ||
| client_id: prefs.clientId, | ||
| client_secret: prefs.clientSecret, | ||
| grant_type: "authorization_code", | ||
| code: authorizationCode, | ||
| }).toString(), | ||
| }); |
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.
PKCE flow doesn't need client_secret in token exchange - you're using OAuth.PKCEClient which is designed to work without client secrets. Including it here contradicts the PKCE security model.
| const response = await fetch(`${getAuthBaseUrl()}/oauth/token`, { | |
| method: "POST", | |
| headers: { | |
| "Content-Type": "application/x-www-form-urlencoded", | |
| Accept: "application/json", | |
| }, | |
| body: new URLSearchParams({ | |
| client_id: prefs.clientId, | |
| client_secret: prefs.clientSecret, | |
| grant_type: "authorization_code", | |
| code: authorizationCode, | |
| }).toString(), | |
| }); | |
| const response = await fetch(`${getAuthBaseUrl()}/oauth/token`, { | |
| method: "POST", | |
| headers: { | |
| "Content-Type": "application/x-www-form-urlencoded", | |
| Accept: "application/json", | |
| }, | |
| body: new URLSearchParams({ | |
| client_id: prefs.clientId, | |
| grant_type: "authorization_code", | |
| code: authorizationCode, | |
| code_verifier: authRequest.codeVerifier, | |
| }).toString(), | |
| }); |
| const authRequest = await client.authorizationRequest({ | ||
| endpoint: `${getAuthBaseUrl()}/oauth/authorize`, | ||
| clientId: prefs.clientId, | ||
| scope: "/authenticate", | ||
| }); | ||
|
|
||
| const { authorizationCode } = await client.authorize(authRequest); | ||
|
|
||
| const response = await fetch(`${getAuthBaseUrl()}/oauth/token`, { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/x-www-form-urlencoded", | ||
| Accept: "application/json", | ||
| }, | ||
| body: new URLSearchParams({ | ||
| client_id: prefs.clientId, | ||
| client_secret: prefs.clientSecret, | ||
| grant_type: "authorization_code", | ||
| code: authorizationCode, | ||
| }).toString(), | ||
| }); |
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.
Using OAuth.PKCEClient but not including code_verifier in token exchange. PKCE requires the code verifier to be sent. Check if ORCID API supports PKCE - if not, this flow mixing client_secret with PKCE is incorrect.
If ORCID doesn't support PKCE, remove client_secret from preferences and properly implement PKCE by including:
code_verifier: authRequest.codeVerifier,
redirect_uri: authRequest.redirectURI,If ORCID doesn't support PKCE at all, consider using a traditional OAuth client instead of PKCEClient.
| onAction={() => open(`${getAuthBaseUrl()}/${result.orcidId}`)} | ||
| /> | ||
| <Action.CopyToClipboard | ||
| title="Copy Orcid" |
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.
Inconsistent capitalization - should be "Copy ORCID iD" to match branding used elsewhere in the extension (see copy-orcid.ts:8)
| title="Copy Orcid" | |
| title="Copy ORCID iD" |
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.
issue: metadata image style
Could you make sure that the metadata images use the same background/appearance as the rest to maintain the same visual expression?
Reference:
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.
issue: metadata image style
Could you make sure that the metadata images use the same background/appearance as the rest to maintain the same visual expression?
Reference:
0xdhrv
left a comment
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.
Minor feedback and comments
Co-authored-by: Dhruv Suthar <intelligentjimmy@gmail.com>
Description
Search researchers and access your ORCID profile directly from Raycast.
Features
Setup
Users need to register for ORCID API credentials at orcid.org/developer-tools and configure their Client ID and Client Secret in extension preferences.
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder