Open utterances-bot opened 1 year ago
swap out omniauth-google_oauth2 for omniauth-google-oauth2, the previous is outdated and is using omniauth 1
@stephanelpaul Thanks, corrected ✅
facebook now doesnt provide email and name unless your app is whitelisted.. new apps have to go through approval process I believe..
Is it possible to do:
account_from_omniauth {}
for facebook and the below for others?
account_from_omniauth { account_table_ds.first(email: omniauth_info["email"]) }
Yes, I believe the following should work:
account_from_omniauth do
unless omniauth_provider == :facebook
account_table_ds.first(email: omniauth_info["email"])
end
end
thank you!
Social Login in Rails with Rodauth | Janko Marohnić
OmniAuth provides a standardized interface for authenticating with various external providers. Once the user authenticates with the provider, it’s up to us developers to handle the callback and implement actual login and registration into the app. There is a wiki page laying out various scenarios that need to be handled if you want to support multiple providers, showing that it’s by no means a trivial task.
https://janko.io/social-login-in-rails-with-rodauth/