diff --git a/Sources/AppAuthCore/OIDAuthState.m b/Sources/AppAuthCore/OIDAuthState.m index cb5a22a1e..cd43508db 100644 --- a/Sources/AppAuthCore/OIDAuthState.m +++ b/Sources/AppAuthCore/OIDAuthState.m @@ -371,10 +371,10 @@ - (void)updateWithTokenResponse:(nullable OIDTokenResponse *)tokenResponse // Calling updateWithTokenResponse while in an error state probably means the developer obtained // a new token and did the exchange without also calling updateWithAuthorizationResponse. // Attempts to handle gracefully, but warns the developer that this is unexpected. - NSLog(@"OIDAuthState:updateWithTokenResponse should not be called in an error state [%@] call" - "updateWithAuthorizationResponse with the result of the fresh authorization response" - "first", - _authorizationError); + AppAuthRequestTrace(@"OIDAuthState:updateWithTokenResponse should not be called in an error state [%@] call" + "updateWithAuthorizationResponse with the result of the fresh authorization response" + "first", + _authorizationError); _authorizationError = nil; } diff --git a/Sources/AppAuthCore/OIDIDToken.m b/Sources/AppAuthCore/OIDIDToken.m index 57a7324e8..0c5387c10 100644 --- a/Sources/AppAuthCore/OIDIDToken.m +++ b/Sources/AppAuthCore/OIDIDToken.m @@ -27,6 +27,7 @@ static NSString *const kNonceKey = @"nonce"; #import "OIDFieldMapping.h" +#import "OIDDefines.h" @implementation OIDIDToken @@ -117,7 +118,7 @@ + (NSDictionary *)parseJWTSection:(NSString *)sectionString { NSError *error; id object = [NSJSONSerialization JSONObjectWithData:decodedData options:0 error:&error]; if (error) { - NSLog(@"Error %@ parsing token payload %@", error, sectionString); + AppAuthRequestTrace(@"Error %@ parsing token payload %@", error, sectionString); } if ([object isKindOfClass:[NSDictionary class]]) { return (NSDictionary *)object;