diff --git a/Demo/Demo/Demo-iOS/Info.plist b/Demo/Demo/Demo-iOS/Info.plist
index 9fc6698..30264e2 100644
--- a/Demo/Demo/Demo-iOS/Info.plist
+++ b/Demo/Demo/Demo-iOS/Info.plist
@@ -13,6 +13,10 @@
+ LSApplicationQueriesSchemes
+
+ smartdrive
+
UIApplicationSceneManifest
UIApplicationSupportsMultipleScenes
diff --git a/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanAuthenticator.swift b/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanAuthenticator.swift
index 7691fd9..ddb5699 100644
--- a/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanAuthenticator.swift
+++ b/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanAuthenticator.swift
@@ -67,7 +67,8 @@ class AliyunpanAuthenticator: NSObject {
let urlString = url.absoluteString.replacingOccurrences(
of: "alipan.com/applink/authorize",
with: "alipan.com/o/oauth/authorize")
- guard let url = URL(string: urlString + "&source=app_link") else {
+ // TODO: - auto_login 服务修复后需要去除主动 auto_login 参数
+ guard let url = URL(string: urlString + "&source=app_link&auto_login=true") else {
throw AliyunpanError.AuthorizeError.invalidAuthorizeURL
}
return try await startAuthenticationSession(url)
diff --git a/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanPKCECredentials.swift b/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanPKCECredentials.swift
index a13acae..991f4bc 100644
--- a/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanPKCECredentials.swift
+++ b/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanPKCECredentials.swift
@@ -31,8 +31,7 @@ class AliyunpanPKCECredentials: AliyunpanCredentialsProtocol {
scope: scope,
response_type: "code",
code_challenge: codeChallenge,
- code_challenge_method: "S256",
- auto_login: "true")))
+ code_challenge_method: "S256")))
.response()
.redirectUri
diff --git a/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanServerCredentials.swift b/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanServerCredentials.swift
index 05dbda6..e2d42e5 100644
--- a/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanServerCredentials.swift
+++ b/Sources/AliyunpanSDK/AliyunpanCredentials/AliyunpanServerCredentials.swift
@@ -28,8 +28,7 @@ class AliyunpanServerCredentials: AliyunpanCredentialsProtocol {
client_id: appId,
redirect_uri: "oob",
scope: scope,
- response_type: "code",
- auto_login: "true")))
+ response_type: "code")))
.response()
.redirectUri
diff --git a/Sources/AliyunpanSDK/AliyunpanScope/Internal/Authorize.swift b/Sources/AliyunpanSDK/AliyunpanScope/Internal/Authorize.swift
index d0545d3..84cffe7 100644
--- a/Sources/AliyunpanSDK/AliyunpanScope/Internal/Authorize.swift
+++ b/Sources/AliyunpanSDK/AliyunpanScope/Internal/Authorize.swift
@@ -31,10 +31,10 @@ extension AliyunpanInternalScope {
/// h5下true强制用户登录,默认false
public let relogin: Bool?
public let source: String?
- /// true 表示已授权后,后续无需用户主动点击授权。默认 false
- public let auto_login: String
+ /// 已授权后,后续无需用户主动点击授权。true 开启,nil 关闭,默认 nil
+ public let auto_login: String?
- public init(client_id: String, redirect_uri: String, scope: String, response_type: String, code_challenge: String? = nil, code_challenge_method: String? = nil, state: String? = nil, relogin: Bool? = nil, bundle_id: String = Bundle.main.bundleId, source: String? = "appLink", auto_login: String = "false") {
+ public init(client_id: String, redirect_uri: String, scope: String, response_type: String, code_challenge: String? = nil, code_challenge_method: String? = nil, state: String? = nil, relogin: Bool? = nil, bundle_id: String = Bundle.main.bundleId, source: String? = "appLink", auto_login: String? = nil) {
self.client_id = client_id
self.redirect_uri = redirect_uri
self.scope = scope