refactor: 只保留 Web,移除 Capacitor 原生壳
删除 android/、ios/ 两个 Capacitor 原生工程与 capacitor.config.ts、 ionic.config.json,以及 scripts/android、scripts/ios.sh 构建脚本; 根与 apps/web 的 @capacitor/* 依赖和相关 npm scripts 一并移除。 Web 侧去掉原生分支:登录只走云乐坊容器授权面板或顶层重定向, 暗色模式不再改原生状态栏,移除 Android 物理返回键处理。 保留 @nuxtjs/ionic(Web UI 框架)、云乐坊 window.ylf 桥接与 PWA。 决策记录见 docs/decisions/0004-web-only.md。
This commit is contained in:
@@ -9,8 +9,6 @@ export interface YunlefunSsoConfigInput {
|
||||
clientId?: string
|
||||
cloudbaseEnv?: string
|
||||
exchangeUrl?: string
|
||||
nativeClientId?: string
|
||||
nativeRedirectUri?: string
|
||||
redirectUri?: string
|
||||
redirectUris?: string | string[]
|
||||
scope?: string
|
||||
@@ -19,7 +17,6 @@ export interface YunlefunSsoConfigInput {
|
||||
|
||||
export interface YunlefunSsoConfigContext {
|
||||
currentOrigin: string
|
||||
platform: 'native' | 'web'
|
||||
}
|
||||
|
||||
export interface YunlefunSsoConfig {
|
||||
@@ -39,22 +36,18 @@ export function resolveYunlefunSsoConfig(
|
||||
input: YunlefunSsoConfigInput,
|
||||
context: YunlefunSsoConfigContext,
|
||||
): YunlefunSsoConfigResult {
|
||||
const clientId = readSsoClientId(
|
||||
context.platform === 'native' ? input.nativeClientId : input.clientId,
|
||||
)
|
||||
const clientId = readSsoClientId(input.clientId)
|
||||
const cloudbaseEnv = normalizeValue(input.cloudbaseEnv)
|
||||
const exchangeUrl = readSsoRedirectUri(input.exchangeUrl)
|
||||
const webRedirectUris = readWebRedirectUris(input.redirectUris ?? input.redirectUri)
|
||||
const redirectUri = context.platform === 'native'
|
||||
? readSsoRedirectUri(input.nativeRedirectUri)
|
||||
: webRedirectUris.find(uri => new URL(uri).origin === context.currentOrigin)
|
||||
const redirectUri = webRedirectUris.find(uri => new URL(uri).origin === context.currentOrigin)
|
||||
const scope = readSsoScope(input.scope)
|
||||
const ssoOrigin = normalizeHttpsOrigin(input.ssoOrigin)
|
||||
|
||||
if (!clientId
|
||||
|| !CLOUDBASE_ENV_RE.test(cloudbaseEnv)
|
||||
|| !exchangeUrl
|
||||
|| (context.platform === 'native' ? !redirectUri : webRedirectUris.length === 0)
|
||||
|| webRedirectUris.length === 0
|
||||
|| scope.length === 0
|
||||
|| !ssoOrigin) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user