元のURLがrequest.env['omniauth.origin']に入っているよ!下記のようにすれば戻れる。
class SessionsController < ApplicationController
def callback
# do your authentication stuff here...
redirect_to request.env['omniauth.origin'] || '/default'
end
end
More than 5 years have passed since last update.
元のURLがrequest.env['omniauth.origin']に入っているよ!下記のようにすれば戻れる。
class SessionsController < ApplicationController
def callback
# do your authentication stuff here...
redirect_to request.env['omniauth.origin'] || '/default'
end
end
Register as a new user and use Qiita more conveniently