-
Notifications
You must be signed in to change notification settings - Fork 228
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
OAuth2::Error in OauthsController#callback #74
Comments
raise error at first, when OAuth2::Client.new
|
@kentarohorie Sorry, it's the right project..athix advised you, and you moved the issue. Deleted the commment. |
@ebihara99999 should I delete this comment? |
@kentarohorie |
Hi @kentarohorie, Could you please post your full callback method and Sorcery config file? (Make sure to delete/omit any keys/secrets if they aren't environment variables! Also, I believe |
ops...I forget hide my secret! thank you!! |
sorcery.rb
|
my callback method
|
Thank you for your help |
@athix |
@kentarohorie
The link is the issue of adding Seeing the official document, it also expects query without spaces: It's an example written in the page:
I hope this helps! |
@ebihara99999 |
|
@athix Do you have any idea about this facebook login error? |
Here is my current configs for reference: config.facebook.user_info_path = 'me?fields=name,email,locale,timezone'
config.facebook.user_info_mapping = { realname: 'name',
email: 'email',
locale: 'locale',
timezone: 'timezone' }
config.facebook.access_permissions = ['public_profile', 'email']
config.facebook.display = 'page'
config.facebook.api_version = 'v2.8' Perhaps try changing the display to page, and including 'public_profile' in your permissions? Other than that, it might just be that Facebook is broken again. (They like to make breaking changes it seems...) |
I tried with your advice.
but result is same... |
Hm. Have you tried using any other OAuth providers and seeing if they give the same error? That would at least narrow it down a little bit more. I would recommend trying twitter, it seems to be the easiest to get setup. Possibly related? Intridea/OAuth2 #75 |
Umh...is it a personal app and open to anybody? Then I can debug in this weekend if I have time. |
I try with twitter. and It work!! |
@kentarohorie what version of Sorcery are you using? Just realized your config doesn't have parse in it, and the error looks like the new response format Facebook uses. Could be #53 causing issues due to an outdated version. |
@athix |
Haha, mystery solved. @kentarohorie Yes, please update to 0.11 and that should hopefully solve the issue. If it does, I'll make sure to update the changelog, wiki, and any other relevant places to make sure users know to use 0.11.0+ if they need Facebook. |
It's work with 0.11!!!! |
No problem @kentarohorie! I've updated the wiki and Changelog, closing this issue. |
I try facebook login referring this external wiki .
but I get this error
OAuth2::Error in OauthsController#callback
if @user = login_from(provider)
{"access_token":"xxxxxxx", "token_type":"bearer","expires_in":5183999}
What should I do?
this is log
OauthsController#callback
get_token method in Oauth2's client.rb
options[:raise_errors]
=> true
and I get error get_access_token in sorcery's oauth2.rb
The text was updated successfully, but these errors were encountered: