feat: 统一 Commilitia Drop 全客户端命名与分发
This commit is contained in:
@@ -135,7 +135,7 @@ final class AuthManager
|
||||
let verifier = PKCE.randomToken(64)
|
||||
let challenge = PKCE.challenge(for: verifier)
|
||||
let state = PKCE.randomToken(24)
|
||||
let redirectURI = "cdrop://auth-callback"
|
||||
let redirectURI = "commilitia-drop://auth-callback"
|
||||
|
||||
var comp = URLComponents(string: cfg.brokerURL.trimmingTrailingSlash() + "/device/authorize")!
|
||||
comp.queryItems = [
|
||||
@@ -144,13 +144,13 @@ final class AuthManager
|
||||
URLQueryItem(name: "state", value: state),
|
||||
URLQueryItem(name: "code_challenge", value: challenge),
|
||||
URLQueryItem(name: "code_challenge_method", value: "S256"),
|
||||
URLQueryItem(name: "description", value: "Commilitia Drop iOS"),
|
||||
URLQueryItem(name: "description", value: "Commilitia Drop"),
|
||||
]
|
||||
guard let authURL = comp.url else { throw BrokerLoginError.incompleteConfig }
|
||||
|
||||
let flow = BrokerAuthFlow()
|
||||
brokerFlow = flow
|
||||
let callback = try await flow.run(url: authURL, callbackScheme: "cdrop")
|
||||
let callback = try await flow.run(url: authURL, callbackScheme: "commilitia-drop")
|
||||
brokerFlow = nil
|
||||
if gen != loginGeneration { return }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user