New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syncing on one device produces invalid token on another device (Google Drive) #1248
Comments
Having the same issue:
|
Same issue here Browser: Chrome |
There are two problems here:
|
And probably use a more descriptive message like |
I have the same with Dropbox. |
I'm not sure that will help. I think logging in from a second machine will boot other machines for the same reason that disconnecting does: Google sees the login request from the second machine as a re-acquiring of access Stylus already has, since the access is managed by account. So it replaces the previous access with the new one. If I choose "Login" from a second machine, where I already have sync set up on a first machine, this is the page that comes up: Given that Stylus "already has some access", and what is being requested here is the SAME access, it's not particularly surprising that the previous access is overridden by the new grant. Seems as though Google grants access by account, not by host, so the same account shouldn't need to acquire access to the same service more than once — or if it does, only the most recent is valid.. Stylus' tokens for that access may need to be transferred from one machine to the other(s), but that could perhaps be done using Chrome's built-in Extension Settings sync. |
Actually, that won't even work, because it still won't solve the related problem where if I connect Stylus in Chrome to my Google Drive account, then try to connect Stylus in Firefox to the same account (from the same machine), Chrome gets booted out. Feels like there must be a different API for updating access to add additional client instances, rather than effectively transferring the grant from one instance to another. |
Ooh! You know what I don't see, in the existing code? I'm not sure, but this may be the path to retrieving authorization tokens on a second client without destroying the previous authorization from a different client. (From Using OAuth 2.0 to Access Google APIs § Incremental authorization, emphasis mine):
(In the "OAuth 2.0 Endpoints" subtab:)
|
Do you mean that the sync fails on the 1st machine if you connect to Google on the second machine? I didn't see this behavior when testing. I also sync to GDrive in both Edge and Firefox on my laptop.
By marking invalid token as a grant error, users can re-login without disconnect i.e. they can avoid revoking tokens in other machines. Note that it is not just an issue of Google. Suppose you use Stylus on multiple machines and have setup browser sync, all other machines will disconnect all together if you disconnect one of them. Because changes to the setting also flow to other machines via browser sync.
That's interesting. I think Google expect us to access the service via a single instance, which generally should be a web server. This also explains why Google invalidates all tokens from the same account if they get a single revoke request. |
Not much I think I can say, really. I've had this issue for a week or so now. I use multiple devices, and syncing Stylus to Drive works after disconnecting and reconnecting to sync, but only on that device. When I go to another that I have previously synced, it will produce this icon and fail to sync (with the message from above). Repeating the disconnect/reconnect steps then allow it to sync again, but other devices then fail once more.
The text was updated successfully, but these errors were encountered: