Logging Users out of Sisense from your Site

Comments

16 comments

  • Avatar
    kikas01 (Edited )

    This only works if the iframe with Sisense is loaded (and waiting for events).

    If I have site where the logout page does not have any iframe with Sisense, how can I logout from Sisense?

     Also if I issue a postMessage and I have Sisense on a different domain it does not work : 

    "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://sisensesite:553') does not match the recipient window's origin ('https://mysite.com')." 

    Can you help on this ? 

    Tkx

     

     

  • Avatar
    Matt Marston

    Is this still valid? I cannot get it to work. Am I suppose to call 'postMessage' on the iFrame? Also, our Sisense server is hosted on a different server than our website. So, should the call look like this: postMessage('message', <sisense server address>);

    Any help on this would be appreciated. 

  • Avatar
    Nouman bhatti

    Has anybody found a solution of this?

  • Avatar
    Oxana Noa Umansky

    Hi Matt and Nouman,

    We are looking into this and will get back to you soon. 

    Thanks,

    Oxana

  • Avatar
    Lidor Rosencovich

    Hi Matt and Nouman,

     

    The postMessage method should be called from your native application and you should have a Sisense iFrame on your current page when doing it.

    Inside Sisense, you should have the postMessage plugin which listens to the message when you send it and logout the user. 

    In the targetOrigin field you should provide the same base url as you used to load Sisense in the iFrame.

    so for example if the iFrame shows the following url: http://SisenseWebSite.com:8081/app/main#/dashboards/591ac837015fd5242f000011

    Then, your originTarget should be: http://SisenseWebSite.com:8081

    And of course don't forget to allow cross origin in Sisense according to the doc link from the forum post above.

     

    Hope it answers your question.

    Regards,

    Lidor

  • Avatar
    Todd Winton

    When I have this addon active and login to sisense directly, I get immediately logged out.  Is there something I need to stop this?

  • Avatar
    Oxana Noa Umansky

    Hi Todd,

    How did you implement the logout API call? What triggers it?

    Thanks,

    Oxana

  • Avatar
    Todd Winton

    This is not even implementing the logout api call, this is with the addon active in sisense.

  • Avatar
    Alina Lotman

    Hi,

     

    Does this work when I use SSO and Sisnese is not embedded with iframe but opens in a separate URL?

     

     

  • Avatar
    Oleg Fil

    The plugin has been updated and now accepts the new post message arguments format in order to work properly.

  • Avatar
    Oleg Fil

    Hi Alina,

    In your case you can run the logout API method directly in the window where Sisense is opened.

  • Avatar
    Suresh

    Hi,

    I enabled SSO with sub-domain as redirect url and now I am not able to login sisense directly.

    It is redirecting to sub-domain every time I try to access Sisense.

    It may be right place to ask. But I am stuck with this.

    Is there any way I can disable SSO without any token?

    Thanks.

  • Avatar
    Michael Becker

    Hi Suresh,

    if you access your sisense with /app/account#/login at the end of url, you will bypass SSO settings.

    Regards,

    Michał

  • Avatar
    Suresh

    Thanks Michael for quick response.

    It worked.

  • Avatar
    Nigel Elliott

    Hi,

    Does Sisense offer a logout endpoint that when called through an iFrame to remove the user session as per the OpenID Connect Specification: http://openid.net/specs/openid-connect-frontchannel-1_0.html

    Please see http://openid.net/specs/openid-connect-frontchannel-1_0.html#ExampleFrontchannel of the functionality we are after.

    I would guess if there is no such page it should be straight forward to build a page that access the REST API as shown above to terminate the session, is there an option for us to add such a page to Sisense?

    Thanks,

    Nigel

  • Avatar
    Nigel Elliott

    Hi,

    An answer to my own question. I used the Developer Tool within Chrome to look at the network traffic when you sign out of Sisense and noticed that the following endpoint is invoked: https://<hostname>/api/auth/logout, I did some experiments with this and it does indeed clear the Sisense session, so I have added this as the post logout redirect in the OpenID Connect server.

    Thanks,

    Nigel

Please sign in to leave a comment.