
Photo by Dan Freeman on Unsplash
Auckland, New Zealand
Auckland 的港口,有不少提供燭光晚餐的餐廳。
https://github.com/AzureAD/microsoft-authentication-library-for-objc
反正我從 iOS MSAL tutorial 理解,唯一處理 issue 在登出,要 clear All Account Caches。
func clearAllAccountCaches() {
        let pcaConfig = MSALPublicClientApplicationConfig(clientId: ClientID)
        guard let application = try? MSALPublicClientApplication(configuration: pcaConfig) else {
            return
        }
        let accounts = try? application.allAccounts()
        if let allAccounts = accounts {
            for account in allAccounts {
                do {
                    try application.remove(account)
                } catch {
                    print("Failed to remove account: \(error)")
                }
            }
            print("All accounts removed successfully")
        }
    }