In your routes.rb file, you should specify the callback using OmniAuth as follows:
match "/auth/:provider/callback" => "Users#share"
Where you can return your action / method to the UsersController class:
def share
and create its view file in views -> users - > share.html.erb
And you may have a different layout for this template, if you prefer to use it.
source share