webplatform / annotation-service

Hypothes.is’ container project to customize for notes.webplatform.org
1 stars 0 forks source link

Implement session recovery #2

Closed tilgovi closed 9 years ago

tilgovi commented 10 years ago

http://docs.webplatform.org/wiki/WPD:Projects/SSO/Login_Workflows#Starting_a_session_by_communicating_with_accounts_server

renoirb commented 9 years ago

Note about how to configure sso.js

When we load the javascript libraries, before calling sso.js, add a configuration block like this.

var ssoOptions=ssoOptions||{logging:true, callbackUri:'https://notes.webplatform.org/recover')};

/* To ask for logout, create an event listener, here `#pt-logout a` is the logout link in MediaWiki */
jQuery('body').on('click', '#pt-logout a', function(evt){
  evt.preventDefault();
  window.sso.signOut();
});