ios - Refresh Token AWS Cognito User Pool, Code Block Not Even Running -
i attempting refresh users tokens, , doing in "child" app has access idtoken, accesstoken, refreshtoken, , user's information aside password. sandboxed , cannot communicate main app.
i have attempted following code run initiateauth
let authparams = [ "refresh_token": user.refreshtoken, "secret_hash": config.getclientsecret() ] let provider = awscognitoidentityprovider(forkey: config.getclientsecret()) let req = awscognitoidentityproviderinitiateauthrequest() req?.authflow = awscognitoidentityproviderauthflowtype.refreshtoken req?.clientid = config.getclientid() req?.authparameters = authparams provider.initiateauth(req!).continuewith() { resp in print("i'm not running") if (resp != nil) { print(resp.error.debugdescription) } else { print(resp.result.debugdescription) } return nil }
shockingly enough, continuewith block of code doesn't run @ all, , print statement "i'm not running" not called. i'm @ loss of do, seems doing in sdk: https://github.com/aws/aws-sdk-ios/blob/master/awscognitoidentityprovider/awscognitoidentityuser.m#l173
Comments
Post a Comment