Skip to content

Commit af8ae3f

Browse files
committed
fix: fix failed to fetch access_token due to no client_secret
1 parent 1a9f955 commit af8ae3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/cnblogs-oauth.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ export class CnblogsOAuthService extends Disposable {
4747

4848
async getAuthorizationInfo(authorizationCode: string, codeVerifier: string): Promise<UserAuthorizationInfo> {
4949
let url = globalState.config.oauth.authority + globalState.config.oauth.tokenEndpoint;
50-
const { clientId } = globalState.config.oauth;
50+
const { clientId, clientSecret } = globalState.config.oauth;
5151
const s = new URLSearchParams([
5252
['code', authorizationCode],
5353
['code_verifier', codeVerifier],
5454
['grant_type', 'authorization_code'],
5555
['client_id', clientId],
56+
['client_secret', clientSecret],
5657
['redirect_uri', this.listenUrl],
5758
]);
5859
url = `${url}`;

0 commit comments

Comments
 (0)