How do you get the URL that OmniAuth redirect to when you go to /auth/twitter
?
I am building an API server and just want to pass the URL in JSON to the client so it can do whatever it needs to with the URL.
I think what I want is the result of the strategy's request_phase
as that looks to be the auth URL, but how do I get that in a new controller so I can do:
class MyOauthController < ApplicationController
# GET /my_oauth/signin/twitter.json
def signin
url = ???
render json: {signin_url: url}
end
Is there a clean way to do this?