0

I have problems with logging out user from Sisense. So I login using jwt and can see my dashboard using SisenseJS. And now I want to call logout (https://sisense/api/auth/logout). Sisense is located in another server inside same local network so have ip like 10.0.0.45 and I have maped it to "sisense" inside host file. All good.

Then if I just go to browser and put https://sisense/api/auth/logout inside address bar, it works. I also using self-signed certificate so it prompt me to "do you want to continue as this site is not trusted...bla bla bla". But problem starts when I call that endpoint from ajax

  $.ajax({
              method: "GET",
              contentType: 'application/json',
             url: "https://sisense/api/auth/logout"
    });

(actually I tried to call it from webclient inside controller also, and it does not need to be ajax call anything acceptable). So it returns 403 error. What I am doing wrong? Should I put some headers? Does any one have any experience on it?

2
  • Could you attach the full contents of the 403 error? Also, you might find more details in the iisnode logs, usually located under c:/program files/sisense/prismweb/vnext/iisnode. Lastly, when you are on the page executing the ajax call to logout, if you open the developer console can you see the Sisense cookie? (prism or prism_shared) Commented Sep 12, 2017 at 16:03
  • Hi, it does not have those cookies. I tried to manually add those (which is not very good solution) but it still didn't worked. I just think that ajax call not supported for that api (for example in Azure they also does not support ajax call, at least I found one conversation where someone was telling about it). Commented Sep 14, 2017 at 10:27

1 Answer 1

1

Finally got it working.

So ajax call didn't worked, but redirection was the solution.

Added controller

public ActionResult SignOut()
        {
            return Redirect("https://sisenseAddress/api/v1/authentication/logout");
        } 

Also you may need to activate CORS on Sisesnse

And as you probably using some SSO like Azure you can put that Logout action url inside Sisense SSO settings as Logout endpoint. So it first do sisense logout and then go back to you site and do lets say Azure logout.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.