jhuapl-boss / boss-oidc

Django Auth plugin specific to the Boss SSO Server
Apache License 2.0
13 stars 22 forks source link

Redirect doesn't work properly #13

Open Allan-Nava opened 6 years ago

Allan-Nava commented 6 years ago

Hi @j6k4m8 ,

When I login and I get this call: "GET /notifications/check/?_=1520963110746 HTTP/1.1" 200 1

I redirect -> "GET /openid/openid/KeyCloak?next=/feeds/ HTTP/1.1" 302 0 But sometimes I got: "GET /openid/openid/KeyCloak?next=/notifications/check/?_=1520963110732 HTTP/1.1" 302 0

I use this function:

function check_notifications() {
    $.ajax({
      url: '/notifications/check/',
      cache: false,
      success: function (data) {
        console.log(data);
        if (data != 0) {
            $('#notifications').attr("data-notifies-count", data);
            $("#notifications").addClass("new-notifications");
        }
        else {
            //console.log(data);
            //$('#notifications').data("notifies-count", data);
            $('#notifications').attr("data-notifies-count", data);
            $("#notifications").removeClass("new-notifications");
        }
      },
      complete: function () {
        window.setTimeout(check_notifications, 50000);
      }
    });
  };
  check_notifications();

How can I fix this problem?

derek-pryor commented 6 years ago

@Allan-Nava I'm not sure. How are you being redirected? Normally with redirect based logins the user clicks a login button / link that includes the ?next= value of the current page. Normally, like in the scenario I described, the bossoidc/djangooidc plugins don't have anything to do getting/setting the redirect page.

Allan-Nava commented 6 years ago

I need to go automatically to registration page

Inviato da iPhone

Il giorno 11 lug 2018, alle ore 17:01, Derek Pryor notifications@github.com ha scritto:

@Allan-Nava I'm not sure. How are you being redirected? Normally with redirect based logins the user clicks a login button / link that includes the ?next= value of the current page. Normally, like in the scenario I described, the bossoidc/djangooidc plugins don't have anything to do getting/setting the redirect page.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.