FIX: If login is required, redirect to the `/login` route instead of root

This commit is contained in:
Robin Ward 2017-05-25 13:35:15 -04:00
parent bb208be822
commit 8a8dec550b
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ class Users::OmniauthCallbacksController < ApplicationController
end
unless @origin.present?
@origin = Discourse.base_uri("/")
@origin = SiteSetting.login_required? ?
Discourse.base_uri("/login") :
Discourse.base_uri("/")
end
if @auth_result.failed?