VIMNetworking icon indicating copy to clipboard operation
VIMNetworking copied to clipboard

how to check user has logined and can retrieve feeds in Swift

Open geek1250 opened this issue 9 years ago • 0 comments

Issue Summary

if app have run the logout vimeo method, this sentence " (VIMSession.sharedSession()?.account?.isAuthenticated() == nil)" will always be false, I thought it should be false so that the app can reopen URL

Reproduction Steps

I use the folloing code to logout if ((VIMSession.sharedSession()?.account?.isAuthenticated()) != nil) {

        VIMSession.sharedSession()?.client.logoutWithCompletionBlock({ (vIMServerResponse, error) in
            if error == nil {
               
            }else {
                print("vimeo logout error: \(error)")
            }
            
        })

    }

And next time I want to login again with authorize with the these codes: if (VIMSession.sharedSession()?.account?.isAuthenticated() == nil) { let url = VIMSession.sharedSession()!.authenticator.codeGrantAuthorizationURL() UIApplication.sharedApplication().openURL(url!) } else{ //retrieve feeds }

I thought if (VIMSession.sharedSession()?.account?.isAuthenticated() == nil) should be true and reopen URL again if app have run the logout vimeo method.. But it always go to retrieve feeds part directly, and there is no feed found if app have run the logout vimeo method.

Expected Behavior

I thought if (VIMSession.sharedSession()?.account?.isAuthenticated() == nil) should be true and reopen URL again if app have run the logout vimeo method.. But it always go to retrieve feeds part directly, and there is no feed found if app have run the logout vimeo method.

Actual Behavior

it always go to retrieve feeds part directly, and there is no feed found if app have run the logout vimeo method.

geek1250 avatar Nov 15 '16 22:11 geek1250