If anyone stumbles on this, here is the solution
Go to pod, NXOAuth2Client.m and replace the method - (void)requestTokenWithAuthGrant:(NSString *)authGrant redirectURL:(NSURL *)redirectURL; with the code below
- (void)requestTokenWithAuthGrant:(NSString *)authGrant redirectURL:(NSURL *)redirectURL; { NSAssert1(!authConnection, @"authConnection already running with: %@", authConnection); NSMutableURLRequest *tokenRequest = [NSMutableURLRequest requestWithURL:tokenURL]; [tokenRequest setHTTPMethod:self.tokenRequestHTTPMethod]; [authConnection cancel]; // just to be sure self.authenticating = YES; NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"authorization_code", @"grant_type", clientId, @"client_id", // clientSecret, @"client_secret", [redirectURL absoluteString], @"redirect_uri", authGrant, @"code", nil]; if (self.desiredScope) { [parameters setObject:[[self.desiredScope allObjects] componentsJoinedByString:@" "] forKey:@"scope"]; } if (self.customHeaderFields) { [self.customHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *obj, BOOL *stop) { [tokenRequest addValue:obj forHTTPHeaderField:key]; }]; } if (self.additionalAuthenticationParameters) { [parameters addEntriesFromDictionary:self.additionalAuthenticationParameters]; } authConnection = [[NXOAuth2Connection alloc] initWithRequest:tokenRequest requestParameters:parameters oauthClient:self delegate:self]; authConnection.context = NXOAuth2ClientConnectionContextTokenRequest; }
Comment clientSecret solved the problem
source share