Skip to content

Error refreshing token: invalid_grant #19

@St3ph-fr

Description

@St3ph-fr

Hi

Description of issue :
I created an addon and using oauth2 lib.
At first connection user grant permission for addon
Addon display link to grant oauth2 access.
User validate access, and re open addon.
Access is granted and user can use addon.
User go in his account and revoke access for the add-on.
User open again addon, permission pop up for addon appears
User validate permission.
After validation user get issue : Error refreshing token: invalid_grant
Now each time user try to open addon he get this error.

Details of error : Error refreshing token: invalid_grant (line 379, file "Service", project "OAuth2")

Way to solve the issue : Have access to the script and run PropertiesService.getUserProperties().deleteAllProperties()

After deleting all properties issue above is not displayed.

In the function which open the sidebar for addon I try to catch this error but does not work. I do
try{
var service = getService();
}catch(e){
.....
}

I use version 13 of the lib.
Scope of oauth 2 : http://www.google.com/m8/feeds/
Code of lib is too complex for me so I can't give be more helpful.

Stéphane

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions