Skip to content

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

@geek1250

Description

@geek1250

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions