[aerogear-dev] Possible error in oauth2Type method in AGAuthorizer.m

Yagyesh yagyesh.agrawal at itpeoplecorp.com
Tue Jun 10 06:31:04 EDT 2014


Hello Corinne,

Thanks for the reply. 

I kind of figured out that still features are being added to Facebook OAuth.
For instance, currently I could not do a revoke/deauthorize. Though I was
able to achieve it locally at my end by overriding revokeAccessSuccess in
AGRestOAuth2FacebookModule with something like this:

-(void) revokeAccessSuccess:(void (^)(id object))success
                    failure:(void (^)(NSError *error))failure {
    NSDictionary* paramDict = @{@"access_token":self.session.accessToken};
    [_restClient DELETE:self.revokeTokenEndpoint parameters:paramDict
success:^(NSURLSessionDataTask *task, id responseObject) {
        [self.session saveAccessToken:nil refreshToken:nil expiration:nil];
        if (success) {
            success(nil);
        }
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
}

Revoke end point looks like this:
"https://graph.facebook.com/me/permissions"


I'm hoping with the 1.6 release even the revoke feature would be available
for Facebook OAuth.

Thanks,
Yagyesh



--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/Re-aerogear-dev-Possible-error-in-oauth2Type-method-in-AGAuthorizer-m-tp8121p8131.html
Sent from the aerogear-dev mailing list archive at Nabble.com.


More information about the aerogear-dev mailing list