Force sign in to Yammer without showing popup

We are currently developing a custom yammer widget for one of our clients. This widget interacts with data from the external Yammer network because we require users from other Yammer networks to be able to access it.

The only way we have managed to get it to work is by using the JS SDK.

yam.platform.login (function (data) {console.log (data)}) yam.platform.getLoginStatus (function (data) {console.log (data)})

We noticed that it creates a hidden iframe that acts as a proxy to overcome cross domain issues. However, every time we refresh the browser, we lose the token and the iframe has to authenticate again.

  • Deploying the app to the global catalog will prevent sdk from going to the iframe approach? (It doesn't seem to help)
  • Otherwise, is there a known way to change the popup parameter?

many thanks

+3


source to share


1 answer


I found the answer, it's just a matter of manually setting the previously obtained token:

Login for the first time to receive a token:

yam.platform.login({ network: '{your-permalink-goes-here}' }

      



and then if the page is reloaded

yam.platform.setAuthToken('{the-token-goes-here}'))

      

+3


source







All Articles