FIX: If login is required, redirect to the `/login` route instead of root
This commit is contained in:
parent
bb208be822
commit
8a8dec550b
|
@ -54,7 +54,9 @@ class Users::OmniauthCallbacksController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
unless @origin.present?
|
unless @origin.present?
|
||||||
@origin = Discourse.base_uri("/")
|
@origin = SiteSetting.login_required? ?
|
||||||
|
Discourse.base_uri("/login") :
|
||||||
|
Discourse.base_uri("/")
|
||||||
end
|
end
|
||||||
|
|
||||||
if @auth_result.failed?
|
if @auth_result.failed?
|
||||||
|
|
Loading…
Reference in New Issue