refactor(oauth): drop the hand-written providers and keep only what the SDK ships
The previous commit added five direct clients (Douyin, Microsoft, Facebook, Twitter, Apple) written against each platform's own endpoints. Maintaining five bespoke OAuth implementations — including Apple's ES256 client secret and Twitter's PKCE — is maintenance the bundled yurunsoft SDK does not ask for, and none of them could be verified without production credentials. Only providers yurunsoft/yurun-oauth-login actually implements stay on the direct surface: GitHub, Gitee, QQ, Google, Weibo, Weixin, Baidu and Alipay. Baidu and Alipay move into OAuthProviderBroker's existing client() switch and normalize() map rather than living in a separate class, so there is no new layer to reason about. OAuthProviderClient, its harness and its contract test are deleted outright (-809 lines). The Apple form_post handling added to handle_callback() is reverted too — without Apple there is no POST callback to read. The aggregate-login channel keeps its 16 platforms, matching the reference; that list describes what the aggregation provider offers, not a local implementation. Brand icons for those names stay for the same reason. Verification: 869 widget/navigation tests pass, the PSR-4 audit reports 0 errors, and the catalog constant, PHP schema and Vue schema now list the same 16 aggregate platforms.
This commit is contained in:
1 parent
6db34646ed
commit
b1c3d86e44
8 files changed
+55
-809
No files matched your search
@@ -42,11 +42,6 @@ final class OAuthProviderCatalog {
|
||||
'id_key' => 'weixin_appid',
|
||||
'secret_key' => 'weixin_appsecret',
|
||||
],
|
||||
'douyin' => [
|
||||
'label' => '抖音',
|
||||
'id_key' => 'douyin_appid',
|
||||
'secret_key' => 'douyin_appkey',
|
||||
],
|
||||
'baidu' => [
|
||||
'label' => '百度',
|
||||
'id_key' => 'baidu_appid',
|
||||
@@ -58,31 +53,6 @@ final class OAuthProviderCatalog {
|
||||
'secret_key' => 'alipay_appkey',
|
||||
'extra_keys' => ['private_key' => 'alipay_private_key'],
|
||||
],
|
||||
'microsoft' => [
|
||||
'label' => 'Microsoft',
|
||||
'id_key' => 'microsoft_appid',
|
||||
'secret_key' => 'microsoft_appkey',
|
||||
],
|
||||
'facebook' => [
|
||||
'label' => 'Facebook',
|
||||
'id_key' => 'facebook_appid',
|
||||
'secret_key' => 'facebook_appkey',
|
||||
],
|
||||
'twitter' => [
|
||||
'label' => 'Twitter',
|
||||
'id_key' => 'twitter_appid',
|
||||
'secret_key' => 'twitter_appkey',
|
||||
],
|
||||
'apple' => [
|
||||
'label' => 'Apple',
|
||||
'id_key' => 'apple_appid',
|
||||
'secret_key' => 'apple_appkey',
|
||||
'extra_keys' => [
|
||||
'team_id' => 'apple_team_id',
|
||||
'key_id' => 'apple_key_id',
|
||||
'private_key' => 'apple_private_key',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
/** 彩虹聚合登录支持的平台,与参考主题一致。 */
|
||||
|
||||
Reference in new issue
Block a user