Omnicontacts redirect_uri: facebook, hotmail, yahoo

I use omnicontacts gem so that users can invite their contacts to my site. I have successfully installed it for Google.

I installed an omnicontacts controller with the contacts_callback method, as suggested using the gem readme.

and route: get "/contacts/:importer/callback" => "omnicontacts#contacts_callback"

In the omnicontacts.rb initializer, I have the following:

require "omnicontacts"

Rails.application.middleware.use OmniContacts::Builder do

importer :gmail, "hidden-client-key", "hidden-secret-key", {redirect_path: "/contacts/gmail/callback"}
importer :facebook, "hidden-client-key", "hidden-secret-key", {:redirect_path => "/contacts/facebook/callback" }
importer :hotmail, "hidden-client-key", "hidden-secret-key", {redirect_path: "/contacts/hotmail/callback"}
end

The last two (facebook and hotmail) according to the readme gem file do not need redirect_path, but just in case, when I tested them both with it and without it, and I still get an error message that redirect_uri is not valid. When I was looking for a solution, I found a place where: redirect_path was instead of: callback_path, and tried this, but no luck.

Microsoft ( hotmail) , :

'redirect_uri' . 'https://login.live.com/oauth20_desktop.srf' URL-, URI , .

URI . URI http://example.com/contacts/hotmail/callback, .

-, . ?

+4
1

, , , , .

hotmail

enter image description here

+5

Source: https://habr.com/ru/post/1648013/


All Articles