Index: pkg/oauth2/lib/src/handle_access_token_response.dart |
diff --git a/pkg/oauth2/lib/src/handle_access_token_response.dart b/pkg/oauth2/lib/src/handle_access_token_response.dart |
index 129f259194bfdb4a61881504fc0b015683c73590..eb219d7a90db46486301f9256882970aa7334c9d 100644 |
--- a/pkg/oauth2/lib/src/handle_access_token_response.dart |
+++ b/pkg/oauth2/lib/src/handle_access_token_response.dart |
@@ -34,8 +34,8 @@ Credentials handleAccessTokenResponse( |
if (contentType != null) { |
contentType = ContentType.parse(contentType); |
} |
- validate(contentType != null && contentType.value == "application/json", |
- 'content-type was "$contentType", expected "application/json"'); |
+ validate(contentType != null && (contentType.value == "application/json" || contentType.value == "text/javascript"), |
+ 'content-type was "$contentType", expected "application/json" or "text/javascript"'); |
var parameters; |
try { |