Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
When i try to login using facebook on drupal site with facebook session opened in another tab, it shows "Invalid OAuth access token." error message. Though same thing works fine when facebook session is logged out.
In the url it generates, there is oauth_token parameter. If i remove this parameter from query string, then also it works.
Why is oauth connector is putting this oauth_token parameter? I checked another implementation of oauth login in php. The url it generates does not have oauth_token and therefore works fine.
Comment | File | Size | Author |
---|---|---|---|
error.png | 6.29 KB | Anonymous (not verified) |
Comments
Comment #1
Sumeet.Pareek CreditAttribution: Sumeet.Pareek commentedWeird thing is that I see the same error on my site where login via oauth connector + FB was working fine the last time I checked, and nothing there has changed since then.
This patch, though not ideal (as some in the comments have suggested) fixes the problem. - http://drupal.org/node/1963174
Wondering how this bug(?) popped up automatically?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedYeah, the same thing with my site. I think it's something with FB API for OAuth. But I'm not sure. The reason may be that, as I can see, this module doesn't support OAuth 2.0 (which is using by FB) and OAuth Connector is using its own implementation ("high-level" handlers) for OAuth 2.0. But GET request is provided by OAuth module and it's not corresponds to the OAuth 2.0 standarts (specifically it's adding unnecessary parameter "oauth_token") and FB handler mistakenly takes it as a "access_token".
I've browsed FB developers recent blog posts but couldn't find anything about changes to OAuth API.
I'm using that patch but I think that developers of OAuth module need to know about this bug (although I'm not sure this bug refers to the module).
Comment #3
gibry21 CreditAttribution: gibry21 commentedSubscribing to this....
Broke out of the blue on my site. Most important thing here is that this is being used in the new Kickstart 2.0 distribuition and therefore breaks the social login feature which they are using as a feature.
I'll try the patch but think next release should look at a fix to bring the module in line with FB new standards
Cheers
Comment #4
hmartens CreditAttribution: hmartens commentedI've been struggling for a week now to get the FB login working to no avail :) But the twitter login works beautifully!
When I try to login, it gives me the
"AUTHORIZATION FINISHED
The application has been authorized" message but I'm still not logged in or taken to a registration page. I also see in the addressbar the following: "/oauth/authorized2/3?error_code=190&error_message=Invalid+OAuth+access+token.#_=_"
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commented@hmartens have you tried this patch by seghezzou2? It works for me. Of course it's not a really good practice to hardcode such things but it works.
Comment #6
vinoth.3v CreditAttribution: vinoth.3v commentedpatch works!
Comment #6.0
vinoth.3v CreditAttribution: vinoth.3v commentedDelete broken link
Comment #7
xamanu CreditAttribution: xamanu commentedMarked the following issues as duplicates of this here:
* #1963174: Invalid OAuth access token when trying to login using facebook.
* #2010460: Invalid OAuth access token when trying to login using facebook.
Comment #8
xamanu CreditAttribution: xamanu commentedSame error here, as described in #4, using:
* Drupal 7.28
* OAuth 7.x-3.x-dev
* OAuthconnector 7.x-1.0-beta2
* Tried it without success with seghezzou2's dirty patch.
Moving priority up for this issue, as Facebook is one of the most used OAuth providers.
Comment #9
sanduhrsActually the patch from #1963174-1: Invalid OAuth access token when trying to login using facebook. works fine for me.