File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,21 @@ + (NSDictionary *)parametersWithParameters:(NSDictionary *)parameters
116116
117117- (nullable NSDictionary <NSString *,NSString *> *)
118118additionalTokenRefreshParametersForAuthSession:(GTMAuthSession *)authSession {
119- return [GIDEMMSupport updatedEMMParametersWithParameters:
120- authSession.authState.lastTokenResponse.additionalParameters];
119+ NSDictionary *originalParameters =
120+ [GIDEMMSupport updatedEMMParametersWithParameters: authSession.authState.lastTokenResponse
121+ .additionalParameters];
122+
123+ // Ensure returned dictionary has values of only type String.
124+ NSMutableDictionary <NSString *, NSString *> *convertedParameters =
125+ [NSMutableDictionary dictionary ];
126+ [originalParameters enumerateKeysAndObjectsUsingBlock: ^(NSString *key, id value, BOOL *stop) {
127+ if ([value isKindOfClass: [NSNumber class ]]) {
128+ convertedParameters[key] = [value stringValue ];
129+ } else if ([value isKindOfClass: [NSString class ]]) {
130+ convertedParameters[key] = value;
131+ }
132+ }];
133+ return convertedParameters;
121134}
122135
123136- (void )updateErrorForAuthSession : (GTMAuthSession *)authSession
You can’t perform that action at this time.
0 commit comments