{"id":89113,"date":"2012-07-27T11:00:13","date_gmt":"2012-07-27T15:00:13","guid":{"rendered":"http:\/\/wpmu.org\/?p=89113"},"modified":"2012-07-25T22:54:46","modified_gmt":"2012-07-26T02:54:46","slug":"wordpress-browserid","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/wordpress-browserid\/","title":{"rendered":"Secure WordPress Logins with Mozilla&#8217;s Persona (BrowserID)"},"content":{"rendered":"<p>The <a href=\"http:\/\/wordpress.org\/extend\/plugins\/browserid\/\" target=\"_blank\">Mozilla Persona (BrowserID) plugin<\/a>\u00a0allows you to login to WordPress websites without entering a password. You can use any number of email addresses to login to any number of WordPress sites.<\/p>\n<p><em>WordPress registrations aren&#8217;t handled by the plugin, only logins.<\/em><\/p>\n<h2>BrowserID Example, with Screenshots<\/h2>\n<p>Mozilla Persona is simple. You tell Persona what your WordPress user account email address is; Persona sends you an email to verify you own that address; and it logs you in as the WordPress user associated with that email address. Here it is in action&#8230;<\/p>\n<h3>Step 1<\/h3>\n<p>Install and Activate the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/browserid\/\" target=\"_blank\">BrowserID plugin<\/a>.<\/p>\n<h3>Step 2 (optional)<\/h3>\n<p>Customize the plugin&#8217;s settings. If you skip this step, the default settings will be used,\u00a0shown in these screenshots.<\/p>\n<figure id=\"attachment_89152\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-89152 \" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/07\/WordPress-BrowserID-plugin-settings.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"507\" height=\"550\" \/><figcaption class=\"wp-caption-text\">The BrowserID plugin&#8217;s wp-admin settings<\/figcaption><\/figure>\n<h3>Step 3<\/h3>\n<p>Logout and go back to the Login page to see the Mozilla Persona &#8220;Sign in&#8221; button.<\/p>\n<figure id=\"attachment_89153\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89153\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/07\/Mozilla-Persona-BrowserID-on-WordPress-Login-Page.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"333\" height=\"446\" \/><figcaption class=\"wp-caption-text\">Mozilla Persona (BrowserID) on WordPress Login Page<\/figcaption><\/figure>\n\n<h3>Step 4<\/h3>\n<p>Click &#8220;Sign in&#8221; to bring up the Persona login window.<\/p>\n<figure id=\"attachment_89157\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-89157 \" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/07\/Mozilla-Persona-Log-in-pop-up.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"586\" height=\"480\" \/><figcaption class=\"wp-caption-text\">WordPress Mozilla Persona Login pop-up<\/figcaption><\/figure>\n<h3>Step 5<\/h3>\n<p>Enter the email address of your wp-admin user account. When prompted, create a password for your Mozilla Persona (BrowserID) account. Then you&#8217;ll receive an email at that address to verify you own it. Leave the Persona pop-up window open while you click the email verification link and the pop-up window will close a second later and automatically log you in.<\/p>\n<figure id=\"attachment_89158\" class=\"wp-caption aligncenter\" data-caption=\"true\"><a rel=\"lightbox[89113]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/07\/Mozilla-Persona-click-to-verify-email-address.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-89158 \" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/07\/Mozilla-Persona-click-to-verify-email-address.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"465\" height=\"234\" \/><\/a><figcaption class=\"wp-caption-text\">Click the link to verify your ownership of this email address and your intent to use it to sign in to the specified website<\/figcaption><\/figure>\n<h2>Multiple email addresses, Multiple websites to login to<\/h2>\n<p>If you have more than one blog to login to but use different email addresses, <strong>you can add additional email addresses to the same Persona account<\/strong> while using the same\u00a0Mozilla Persona password you created before. This avoids having multiple Persona accounts to keep track of.<\/p>\n<h2>How does Mozilla Persona work?<\/h2>\n<p>&#8220;Mozilla Persona (BrowserID)&#8221; uses its own secure website (not your WordPress website) as the sign-in server. It keeps you logged in with browser cookies (like your WordPress site does). If you clear your browser cookies, you&#8217;ll be signed out of BrowserID.<\/p>\n<p><strong>If you&#8217;re signed in to BrowserID, you won&#8217;t need to enter a password to login to your WordPress sites.<\/strong> You sign in once to Persona (per web browser, since each browser has its own set of cookies) and then you can sign in to any of your WordPress sites, or any other site that supports BrowserID.<\/p>\n<h3>Tip to make sure you use a single Persona account<\/h3>\n<p>If you&#8217;re signed out of BrowserID and try using it to login to a site you haven&#8217;t setup before (e.g. WordPress user email is &#8216;second@email.com&#8217;), I suggest trying to login with your BrowserID email (e.g. &#8216;first@email.com&#8217;) even though you know there&#8217;s no WP user with that email address. That way, you&#8217;ll be signed in to BrowserID and get a message that your login to the WP site was unsuccessful. Then you can try signing in again and you&#8217;ll see the &#8220;Add another email&#8221; button on the Persona pop-up, and you can go from there. Doing this will ensure you don&#8217;t create separate Persona accounts for each email address; thus, you&#8217;ll have multiple email addresses to choose from but only need to remember a single Persona account password.<\/p>\n<p>Alternatively, if you don&#8217;t want to attempt logging in with this wrong email address, you could just navigate to the <a href=\"https:\/\/login.persona.org\/\" target=\"_blank\">Persona account website<\/a>, add an email address there, and then sign into your website.<\/p>\n<h2>BrowserID compared to other 3rd party login solutions<\/h2>\n<h3>Facebook<\/h3>\n<p>The BrowserID solution is very similar to the blue Facebook &#8220;Log In&#8221; button we see on many sites. However, you don&#8217;t need to create a separate Facebook app for each of your WordPress websites.<\/p>\n<h3>WP Engine&#8217;s\u00a0MixBoardPortalPanelPress<\/h3>\n<p>I previously discussed <a href=\"https:\/\/wpmudev.com\/blog\/wordpress-ssl-login\/\" target=\"_blank\">WP Engine&#8217;s\u00a0MixBoardPortalPanelPress<\/a>, a free &#8220;portal&#8221; to register your WP sites. It&#8217;s designed for you to have a single place to login &#8212; if you need to login to any one of your sites, just login to the WP Engine Portal (with either Facebook or Twitter) and then you can click to be automatically logged in.<\/p>\n<p>The WP Engine Portal is a different approach. If you like having one URL to go to where you can one-click-sign-in to all your sites, WP Engine Portal is probably for you. However, it&#8217;s only able to tie to a single WP user per site. Only one user can use WP Engine Portal to sign in because, in the plugin&#8217;s settings, you have to tell the plugin which user to log you in as when you come from the Portal.<\/p>\n<p>BrowserID enables multiple users to sign in securely, since WordPress doesn&#8217;t allow accounts with duplicate email addresses.<\/p>\n<figure id=\"attachment_89161\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89161\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/07\/WordPress-wont-allow-duplicate-email-addresses.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"420\" height=\"91\" \/><figcaption class=\"wp-caption-text\">WordPress won&#8217;t allow duplicate email addresses<\/figcaption><\/figure>\n<p>If you have multiple users that are all just you with different permissions for testing, you could easily use BrowserID to specify which user to sign in as, based on which email address you tell Mozilla Persona to sign you in as. Unrelated to the BrowserID plugin, I&#8217;d also recommend the <a href=\"https:\/\/wpmudev.com\/blog\/switch-between-wordpress-users-great-for-testing\/\" target=\"_blank\">User Switching plugin<\/a> if you have this sort of setup.<\/p>\n<h2>Mozilla Persona (BrowserID) resources<\/h2>\n<p>For more details about Mozilla Persona (BrowserID), visit:<\/p>\n<ul>\n<li><a href=\"https:\/\/login.persona.org\/about\" target=\"_blank\">How it works<\/a><\/li>\n<li><a href=\"https:\/\/support.mozilla.com\/en-US\/kb\/what-browserid-and-how-does-it-work\" target=\"_blank\">Support Center<\/a><\/li>\n<li><a href=\"https:\/\/hacks.mozilla.org\/2011\/07\/introducing-browserid-easier-and-safer-authentication-on-the-web\/\" target=\"_blank\">Developers<\/a><\/li>\n<\/ul>\n<p>Once you&#8217;ve created a login, you can <a href=\"https:\/\/support.mozilla.org\/en-US\/kb\/how-do-i-manage-my-browserid-account\" target=\"_blank\">manage<\/a> <a href=\"https:\/\/login.persona.org\/\" target=\"_blank\">your Persona account<\/a> to add additional email addresses, change your password, and more.<\/p>\n<h2>A secure alternative to having your own SSL \/ HTTPS login<\/h2>\n<p>WordPress has the ability to <a href=\"http:\/\/codex.wordpress.org\/Administration_Over_SSL\" target=\"_blank\">force all logins to use HTTPS<\/a>, which only works if you have an SSL certificate installed (prices vary, lowest are around $10 per year per site).<\/p>\n<p>The BrowserID plugin provides all of your users a secure sign in alternative even if your site doesn&#8217;t have SSL. You really shouldn&#8217;t be logging into WordPress over HTTP (i.e. non-SSL), especially with Administrator accounts. If someone snags your login details, they&#8217;ll be able to wreak havoc.<\/p>\n<h2>I wish&#8230;<\/h2>\n<p>&#8230;that everyone used HTTPS logins or used a secure alternative like <a href=\"http:\/\/wordpress.org\/extend\/plugins\/browserid\/\" target=\"_blank\">BrowserID<\/a>, <a href=\"https:\/\/wpmudev.com\/project\/ultimate-facebook\/\" target=\"_blank\">Facebook<\/a>, Twitter, or <a href=\"https:\/\/wpmudev.com\/blog\/wordpress-ssl-login\/\" target=\"_blank\">WP Engine Portal<\/a>.<\/p>\n<p>&#8230;and that the BrowserID plugin allowed me to pick my WordPress username instead of the associated email address (although I understand the Persona system is bigger than just being used for WordPress sites).<\/p>\n<p>I think the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/browserid\/\" target=\"_blank\">BrowserID plugin<\/a> is an excellent way to provide <em>all<\/em>\u00a0of your WordPress users with a secure method of logging in.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Mozilla Persona (BrowserID) plugin\u00a0allows you to login to WordPress websites without entering a password. You can use any number of email addresses to login to any number of WordPress sites. WordPress registrations aren&#8217;t handled by the plugin, only logins. BrowserID Example, with Screenshots Mozilla Persona is simple. You tell Persona what your WordPress user [&hellip;]<\/p>\n","protected":false},"author":132061,"featured_media":89187,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[4],"tags":[10810],"tutorials_categories":[],"class_list":["post-89113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-plugins","tag-wordpress-security"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/89113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/132061"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=89113"}],"version-history":[{"count":2,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/89113\/revisions"}],"predecessor-version":[{"id":203861,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/89113\/revisions\/203861"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/89187"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=89113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=89113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=89113"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=89113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}