feat(giffgaff): 支持 PKCE 公有客户端和机密客户端的 OAuth 令牌交换

- 新增 giffgaff-token-exchange.js 函数处理 OAuth 令牌交换
- 增加对 PKCE 公有客户端和机密客户端的支持
- 优化令牌交换流程,支持可选的 Basic 认证
- 更新前端和后端的 OAuth 配置
This commit is contained in:
Abner
2025-08-10 18:08:48 +08:00
parent f7d7c5375d
commit ee034d3cb9
4 changed files with 40 additions and 14 deletions

View File

@@ -61,7 +61,7 @@ describe('Giffgaff OAuthManager', () => {
const verifier = 'test-verifier';
const url = await OAuthManager.buildAuthorizationUrl(verifier);
expect(url).toContain('https://id.giffgaff.com/auth/oauth/authorize');
expect(url).toContain('https://id.giffgaff.com/oauth/authorize');
expect(url).toContain('response_type=code');
expect(url).toContain('client_id=');
expect(url).toContain('redirect_uri=');