I'm upgrading accounts to use the new plus.login
scope, so I tested adding a user with just userinfo
scope and then re-logging in with plus.login
added. The result was that a new entry in the authorized access panel was introduced, and the access token returned from the latter call only had userinfo
permission. I tested this by making a verified token call as well as trying to list people.
Is this expected behaviour, and if so, should I be revoking the old token beforehand? I see it's possible with a /revoke
action. Server side removal of Oauth token
Update: Relevant Gist. This is using Ruby's Omniauth gem. I'm not actually sure how a user can ever see more than 1 entry in the authorized access panel, yet in this circumstance I could see 2. And after testing various scenarios yesterday, I had about 6 entries all belonging to the same app! Note that I didn't change the client ID at any time and in fact only have one client ID.
I'm hoping the situation I described can be replicated by others; it's simply a matter of hacking the Google-side URL to remove the plus.login scope, and then logging in again while preserving the URL as is.
Update (2): I also discovered this gotcha: "You should not request userinfo.profile or plus.me in combination with this scope as they are implicitly included and would create a confusing permissions dialog for your user." In fact, it's more than just a UX permissions issue; it seems Google won't actually store the "plus.me" scope against the user, so it means it will always show the OAuth permissions dialog even if users have already given permissions (I think because it does a simple equality check and notices plus.me is requested, but is not stored against the user).
Update (3): The bug about using the wrong login was caused by my code doing something like user.login || user.signup without updating the token data on a login. So now it updates the access token and the refresh token after every login. (I still don't follow why there needs to be more than one token per client-user combo.)