Skip to content

修改siliconflow登录的clientId#61

Merged
doombeaker merged 9 commits into
masterfrom
dev
May 29, 2025
Merged

修改siliconflow登录的clientId#61
doombeaker merged 9 commits into
masterfrom
dev

Conversation

@linjm8780860
Copy link
Copy Markdown
Collaborator

No description provided.

dfhfg123 and others added 7 commits May 12, 2025 12:03
* fix

* auto prettier format code

---------

Co-authored-by: linjm8780860 <11494038+linjm8780860@users.noreply.github.com>
* fix

* auto prettier format code

* fix

* fix

---------

Co-authored-by: linjm8780860 <11494038+linjm8780860@users.noreply.github.com>
@linjm8780860 linjm8780860 requested a review from Copilot May 17, 2025 04:39
Copy link
Copy Markdown

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 updates the Siliconflow OAuth integration by changing the clientId and adjusting the index used when extracting the secretKey from the popup message.

  • Update hard-coded clientId for Siliconflow login
  • Change array index check for secretKey in the OAuth popup message
Comments suppressed due to low confidence (2)

src/views/btnApiKey/apiKeyDialog.vue:100

  • [nitpick] Accessing event.data by magic indices is fragile. Consider destructuring the payload or validating its shape before use, for clearer intent and safer indexing.
setKey(event.data[0]['secretKey'])

src/views/btnApiKey/apiKeyDialog.vue:93

  • The new login flow logic isn’t covered by existing tests. Consider adding unit or integration tests for openOAuthPopup to verify correct URL generation, popup handling, and message parsing.
const openOAuthPopup = async (setKey: (key: string) => void) => {


const openOAuthPopup = async (setKey: (key: string) => void) => {
const clientId = 'SFIW4myD4HvRT9u9HF12hk'
const clientId = 'SFtNABXGEb5rZxogl8p3cM'
Copy link

Copilot AI May 17, 2025

Choose a reason for hiding this comment

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

Avoid hard-coding the OAuth clientId directly in the component. Consider moving this value to a configuration file or environment variable to make future updates and environment overrides easier.

Copilot uses AI. Check for mistakes.
Comment thread src/views/btnApiKey/apiKeyDialog.vue Outdated
@doombeaker doombeaker merged commit 72673c9 into master May 29, 2025
1 check passed
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.

4 participants