# ZoomSDKAuthDelegate callbacks for login()

**URL:** <https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054>\
**Category:** macOS\
**Created:** [November 27, 2020, 3:07am UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054 "2020-11-27T03:07:50Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [December 19, 2020, 7:50pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/21 "2020-12-19T19:50:00Z")

</div>

Hey @jon.zoom  
As you can see in the screenshot, I provided full disk access to my mac app and also to the Xcode.  
 ![Screenshot 2020-12-19 at 20.45.34](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/8/783c9e718bdfbf592ab58ab4c7d4d70ad1c39e8e.png)

I checked the sample app code and it doesn’t have the `enableLog = true`, so I am assuming it is not updated with the latest functions.

What else I can look for? Also, is it possible for zoom SDK to write logs in same console as my mac app?

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 19, 2020, 10:16pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/22 "2020-12-19T22:16:40Z")

</div>

@jon.zoom Can you show us how is the log we’re looking for supposed to look like?

Also I’ve build a mini app that just logs in into zoom and enables logs. This app also generates no log. Tried with different versions of the SDK. How can I shared it with you so you can tell me what am I missing?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 21, 2020, 6:54pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/23 "2020-12-21T18:54:39Z")

</div>

Hi @j_a_z_z and @tmiskiew,

In addition to enabling logging, it is important to note that the `logFileSize` must be set. This was being done in the snippet provided earlier, but I just wanted to make sure that part was clear.

Since this appears to be something specific to your project and/or dev environment, it will be difficult for me to be of any assistance in tracking down the cause since it does not appear to be an issue with SDK usage. If you are able to figure this out and provide logs or can narrow it down to an issue with the SDK itself, I will be happy to help.

Thanks!

---

<div class="post-metadata">

**Author:** ![j\_a\_z\_z](https://avatars.discourse-cdn.com/v4/letter/j/439d5e/32.png) [@j\_a\_z\_z](https://devforum.zoom.us/u/j_a_z_z)\
**Post date:** [December 21, 2020, 7:34pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/24 "2020-12-21T19:34:36Z")

</div>

Hey @jon.zoom  
Can you please provide a sample project which generates log.  
Current sample project has no code for log generation.

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 21, 2020, 7:35pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/25 "2020-12-21T19:35:36Z")

</div>

@jon.zoom I created a sample project. This is the entire code. No logs are being created. Please point out the place where we incorrectly enable the logs:

```
//
// AppDelegate.swift
// ZoomSDKLoginTest
//
// Created by Thomas Miskiewicz on 10/15/20.
// Copyright © 2020 Thomas Miskiewicz. All rights reserved.
//

import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {

    @IBOutlet weak var window: NSWindow!

    func applicationDidFinishLaunching(_ aNotification: Notification) {
        // Insert code here to initialize your application
    }
    @IBAction func onClickLogin(_ sender: Any) {
        self.login()
    }
    
    func login() -> Void {
        print("Login into account....")
        let res = ZoomSDK.shared()?.getAuthService()?.login("youremail@here.com", password: "password_please", rememberMe: false)
        // let res = ZoomSDK.shared()?.getAuthService()?.login(userName , password: passord, rememberMe: false)
        print("Login Res:\(String(describing: res))")
        if res == ZoomSDKError_Success {
            print("Login was success")
        }
    }
    
    
    @IBAction func onClickAuth(_ sender: Any) {
        let sdk: ZoomSDK = ZoomSDK.shared()
        sdk.zoomDomain = "zoom.us"
        //sdk.initSDK(false)
        let params = ZoomSDKInitParams()
        params.needCustomizedUI = false
        params.enableLog = true
        params.logFileSize = 50
        sdk.initSDK(with: params)
        let authService = sdk.getAuthService()
        authService!.delegate = self
        let authContext = ZoomSDKAuthContext()
        authContext.jwtToken = "eyJhbGciOiJIUzI1NiJ9.eyJhcHBLZXkiOiJrYWF4UGplc1A3NURBRGU2TVg2a0NqdmNscVZnN2tlRERSUHIiLCJpYXQiOjE2MDg1Nzc3MzEsImV4cCI6MTYwODc1MDUzMSwidG9rZW5FeHAiOjE2MDg3NTA1MzF9.zmj_YDwGTbX9wq9idbekw6vjUXp0lX9rDjrEbAri5Yg"
        let response = authService?.sdkAuth(authContext)
        if response == ZoomSDKError_Success{
            DispatchQueue.main.async {
                let alert: NSAlert = NSAlert()
                alert.messageText = "It works!"
                alert.informativeText = "Successfully authorized the app"
                alert.alertStyle = NSAlert.Style.informational
                alert.addButton(withTitle: "OK")
                _ = alert.runModal()
            }
        }
        
    }
    
    func applicationWillTerminate(_ aNotification: Notification) {
        // Insert code here to tear down your application
    }

}

extension AppDelegate : ZoomSDKAuthDelegate {
    func onZoomSDKAuthReturn(_ returnValue: ZoomSDKAuthError) {
        if returnValue != ZoomSDKAuthError_Success{
            let message = NSLocalizedString("SDK auth failed, Error: \(returnValue)", comment: "")
            print(message)
        }
        else{
            print("onZoomSDKAuthReturn: Success")
        }
    }
    
    func onZoomAuthIdentityExpired() {
        print("onZoomAuthIdentityExpired triggered by Zoom")
    }
    
    func onZoomIdentityExpired() {
        print("onZoomIdentityExpired triggered by Zoom")
    }
    
    func onZoomSDKLogin(_ loginStatus: ZoomSDKLoginStatus, failReason reason: String?) {
        print("onZoomSDKLogin triggered by Zoom. Login status:\(loginStatus), reason:\(String(describing: reason))")
        
        if (loginStatus.rawValue == 1) {
            let accountInfo = ZoomSDK.shared()?.getAuthService()?.getAccountInfo()
            print("Display name: \(String(describing: accountInfo?.getDisplayName()))")
        }
        
    }
    
    func onZoomSDKLogout() {
        print("onZoomSDKLogout triggered by Zoom")
    }
}
```

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 23, 2020, 2:12am UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/26 "2020-12-23T02:12:51Z")

</div>

Hi @tmiskiew and @j_a_z_z,

I’m a little stumped on why we’re seeing such different results. If you are enabling logging through the method you have posted in this thread, it should be working.

Would it be possible for you to send your project to us at [developersupport@zoom.us](mailto:developersupport@zoom.us) so that we can investigate further?

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 23, 2020, 8:23pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/27 "2020-12-23T20:23:27Z")

</div>

@jon.zoom Did you receive my email?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 23, 2020, 10:41pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/28 "2020-12-23T22:41:46Z")

</div>

Hi @tmiskiew,

Thanks for sending that over, I can confirm we have received your project and will let you know once we have identified a solution.

Thanks!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 29, 2020, 9:23pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/29 "2020-12-29T21:23:32Z")

</div>

Hi @tmiskiew,

We have had a few people try running your project, and were all able to retrieve the logs from the directory mentioned earlier in this topic.

Since we cannot identify any issues within the project itself which would prevent logs from being saved, this must be an issue with your environment.

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [December 29, 2020, 10:25pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/30 "2020-12-29T22:25:00Z")

</div>

Where exactly did you find these logs? Since the test app is sandboxed, we were able to find the log in Containers for sandboxed apps.  
~/Library/Containers//Data/Library/Logs/ rather than in the location you mentioned previously. Can you share the location and content of your folder? Here’s what I got

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/4/d4503b3d2c901c751dbdfbbd331f3389e5df1da2.jpeg)

Is this what we’re looking for?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 30, 2020, 12:41am UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/31 "2020-12-30T00:41:51Z")

</div>

Hi @tmiskiew,

Yes, that does appear to be the correct files! Can you please send those over when you have a chance so that we can investigate the behavior you are seeing?

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [January 18, 2021, 2:30pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/32 "2021-01-18T14:30:02Z")

</div>

Here are the logs @jon.zoom [https://miskiewicz.s3.eu-central-1.amazonaws.com/zoom/Remote+for+Zoom+18+Jan+2021.zip](https://miskiewicz.s3.eu-central-1.amazonaws.com/zoom/Remote+for+Zoom+18+Jan+2021.zip)

**ZoomAuthService: login: start time: 2021-01-18 14:11:21 +0000**

**2021-01-18 15:11:21.768737+0100 Remote for Zoom[2303:80702] Mac Address: AC:87:A3:12:C9:44**

**ZoomAuthService:onZoomSDKLogin(\_ loginStatus: ZoomSDKLoginStatus(rawValue: 3), failReason reason: , time: 2021-01-18 14:11:21 +0000**

**ZoomAuthService:onZoomSDKLogin(\_ loginStatus: ZoomSDKLoginStatus(rawValue: 2), failReason reason: , time: 2021-01-18 14:11:52 +0000**

**ZoomAuthService: login failed: end time: 2021-01-18 14:11:52 +0000**

**HalloServer: Response: Optional("{“request”:{“auth”:{“login”:[“[xxxyyy@yahoo.com](mailto:xxxyyy@yahoo.com)”,“123456”]}},“response”:“IkVycm9yIg==”}”)**

I provided 100% correct credentials and yet after unbearably long delay the SDK didn’t log me in. I hope the logs can help your team to clarify why.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 20, 2021, 1:42am UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/33 "2021-01-20T01:42:11Z")

</div>

Hi @tmiskiew, thanks for the additional information.

I know that this issue has been ongoing for a while, but we still have not been able to reproduce this across many different environments internally.

Is it possible that you have anything out of the ordinary on your network (e.g. debug proxy, VPN, etc.)? If not, we’re unfortunately headed back to the drawing board on how to make progress on this.

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [January 20, 2021, 6:19am UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/34 "2021-01-20T06:19:54Z")

</div>

Nothing extraordinary here nor at any other location my developers work around the world.

You asked for logs. I provided them. What do you see in there?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 20, 2021, 6:57pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/35 "2021-01-20T18:57:33Z")

</div>

Hi @tmiskiew,

Noted. I don’t have any updates on this for you just yet, but we are doing our best to figure out what could be causing these issues. Please bear with us as we investigate, as the inability to reproduce on our end may cause longer delays than usual.

Regardless, I will let you know as soon as we have any updates or if we need additional information in the future.

Thanks!

---

<div class="post-metadata">

**Author:** ![tmiskiew](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tmiskiew/32/9174_2.png) [@tmiskiew](https://devforum.zoom.us/u/tmiskiew)\
**Post date:** [January 20, 2021, 9:25pm UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/36 "2021-01-20T21:25:28Z")

</div>

Would it make sense to have a short zoom call with one of your devs to demo the problem?

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [January 21, 2021, 12:36am UTC](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054/37 "2021-01-21T00:36:17Z")

</div>

Hi @tmiskiew,

I don’t think that will be necessary. At this point, we fully understand the issue and you have done a great job of outlining the impact it has in your application. It’s just a matter of identifying what could be causing this which is preventing us from reproducing.

If I or anyone else on the team can think of something, I will absolutely reach out. 🙂

Thanks!

[Previous page](https://devforum.zoom.us/t/zoomsdkauthdelegate-callbacks-for-login/37054.md?page=1)
