-
Notifications
You must be signed in to change notification settings - Fork 26
Failed assertion when doing clientViaUserConsent #26
Comments
From @mkustermann on December 4, 2017 11:58 This issue should probably moved to package:googleapis_auth. The assertion is correct in the sense that the oauth2 access token you got back will most likely only be valid for 1h and expire afterwards. Getting a refresh token from the server allows the returned The real question is why the server hasn't returned the refresh token in the first place. |
I tried removing the permission from my account, but that wasn't enough. Some comments claim that one has to set the access_type to offline. |
Could you describe how you created the client Id in the developers console? |
I had created the my credentials for "webapp" and not "other". |
I think we can turn the assertion into a check and an exception. Although we can never know why the server did not return a refresh token, we could hint the user that the provided client credentials were wrong. |
Sounds good to me, although I wonder if there should be a way to use web-tokens for scripts too. |
I add parameter to fix this problem #79 |
From @floitsch on December 2, 2017 16:23
When doing a
clientViaUserConsent
I get the following assertion error:When running without assertions, the code seems to work.
Copied from original issue: google/googleapis.dart#26
The text was updated successfully, but these errors were encountered: