I am wondering if there is a way to bypass
SiteSetting.login_required and return a
payload. I am implementing login via a mobile app against a discourse instance with SSO enabled.
I have a working plugin that returns the nonce instead of redirecting, to be used later in the flow upon login success against the primary site. Looks something like this
def return_nonce nonce = DiscourseSingleSignOn.generate_url(params[:return_path] || '/') uri_array = Rack::Utils.parse_query(nonce) render json: uri_array end
This only works with
login_required off. Could this be function be modified to work with that setting set to on? Thanks!