Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect doesn't work properly #13

Open
Allan-Nava opened this issue Mar 15, 2018 · 2 comments
Open

Redirect doesn't work properly #13

Allan-Nava opened this issue Mar 15, 2018 · 2 comments

Comments

@Allan-Nava
Copy link

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
Copy link
Contributor

@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
Copy link
Author

Allan-Nava commented Jul 11, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants