Commit 4100b116 authored by Cage, Gregory's avatar Cage, Gregory
Browse files

Set External Redirect Cookie in Galaxy

parent 6b0bb4bb
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ class OIDC(JSAppLauncher):

    @web.json
    @web.expose
    def login(self, trans, provider, idphint=None, next=None):
    def login(self, trans, provider, idphint=None, next=None, external_redirect=None):
        if not trans.app.config.enable_oidc:
            msg = "Login to Galaxy using third-party identities is not enabled on this Galaxy instance."
            log.debug(msg)
@@ -93,8 +93,8 @@ class OIDC(JSAppLauncher):
        if success:

            # ORNL ONLY logic
            external_login = trans.get_cookie(trans.app.config.external_login_redirect_cookie)
            if external_login:
            if external_redirect:
                trans.set_cookie(value=external_redirect, name=trans.app.config.external_login_redirect_cookie)
                return trans.response.send_redirect(url_for(redirect_uri))

            return {"redirect_uri": redirect_uri}