We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

navigator.id.logout Redirect 1

Not native
This feature is not built into all browsers. To use it reliably, you'll need to include a JavaScript library in your page as a polyfill. You can include the library from https://login.persona.org/include.js.


This function is used in Persona to cause the browser to reset the automatic / persistent login flag for a website. After being called, the user will need to explicitly log back into your site instead of being signed in automatically.

Websites must call this function in the click handler for the site's "log out" button.

This function does not make the browser clear the user's certificate and signing key. So after calling logout(), a new login attempt may or may not ask the user for a new password, depending on the freshness of the certificate their identity provider gave them. However, it will certainly prompt the user to select an email address and confirm that they want to sign in.




// Execute navigator.id.logout(); when the user clicks "Sign Out"
var signoutLink = document.getElementById('signout');

if (signoutLink) {
  signoutLink.onclick = function(event) {


Not included in any specification.

See also

Document Tags and Contributors

Last updated by: Sheppy,