Identity at Mozilla

Home of the Mozilla Identity team

  1. Sign Into Websites Directly From Your Browser Toolbar

    Aug 12, 2011 — by millsd

    One of the areas we’re actively exploring in the Identity team is how to make it easier and safer for users to sign into websites. The BrowserID project is part of that exploration, but not the sole component. Today, we are releasing an early experimental add-on for Firefox, Browser Sign-In, that allows users to sign into supported websites with one click of a button in Firefox. Watch the video below for a short demo, or download the add-on to try it out!


    How does it work?

    Websites can easily add support for this experimental feature by using a new JavaScript API that the add-on provides. It’s just a few lines to set-up, and it works with any website, regardless of what technology it uses for user sign-ins (BrowserID, OpenID, username & password, etc).

    The feature activates when the page sets the navigator.id.sessions property. It can be empty if there are no active sessions (which means the user is signed out), or it can contain a session object like this:

    navigator.id.sessions = [{ email: "user@foo.com" }];
    

    Then the page just listens for two events, “login” and “logout”, which the browser will send to the page when the buttons are clicked by the user. It’s that easy!

    Since most websites use cookies to implement user sessions, we’ve included some special (but optional) support for them: if websites declare the name of the sign-in cookie, the add-on will watch it and display the correct signed-in state without any additional work from the site. See Shane’s post for additional details of how it all works along with a more detailed tutorial.

    It’s worth noting that this feature doesn’t communicate with any server-side components, and doesn’t capture, store or transfer any personal information. The button is semantically the same as clicking “sign in” on a page: it just tells the page you want to sign in (or sign out) right now.

    Try it out & let us know what you think!

    Simply install the add-on, then browse to our example website, myfavoritebeer.org.

    We’re very excited about this experiment, and as always we want to hear what you think! Try it out, and join our mailing list, or just tweet with the #mozid tag.