Extension:BlockstackSSO

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
BlockstackSSO
Release status: beta
BlockstackSSO.png
Implementation User identity
Description Login to your wiki using your distributed Blockstack account.
Author(s) Aran Dunkley (Nadtalk)
MediaWiki 1.28+
PHP 5.5+
Database changes No
License GNU General Public License 3.0 or later
Download
Hooks used
AuthChangeFormFields
Translate the BlockstackSSO extension if it is available at translatewiki.net
Check usage and version matrix.

The BlockstackSSO extension uses the Blockstack SSO single-signon for PHP apps to create an additional button on the login form allowing users to sign in with their Blockstack profile, which is a decentralised identity system that uses the Bitcoin blockchain.

It's just like the familiar sign-in with Google/facebook/Twitter buttons we see everywhere, but with Blockstack you own your profile rather than relying on a company to look after it for you, and trusting that they'll respect your privacy and will always grant you access to your data (which is really their data).

After a user clicks on the "sign in with blockstack" button, they're directed to the Blockstack browser - either the local distributed app running on their own device, or if that's not installed, the web-based Blockstack browser. The Blockstack app presents the use with a sign-in form advising them of the access that's being requested and allowing them to select which of their Blockstack IDs they'd like to sign in with.

If the selected Blockstack ID is already in use on the wiki, the user will then be automatically logged in to the account it's been previously associated with. Otherwise the user will be prompted to specify a username and password so they can link the Blockstack ID to one of the wiki's existing user accounts.

If the selected account is already linked to a different Blockstack ID, then the user will be prompted to either unlink the account before continuing, or to select a different account to link to. Unlinking accounts is done from the Special:UnlinkAccounts page in the wiki.

Note that currently the extension does not support account creation.

Installation[edit]

Note that this extension depends on the Blockstack SSO single-signon for PHP apps, and expects it to be situated in the base directory of the extension and named _BlockstackCommon_ (case-sensitive). If you're running many different sites that all allow signing in with Blockstack, then it's best to keeo just one copy of the common dependency in your environment and symlink to them from each site that needs it.

  • Download and place the file(s) in a directory called BlockstackSso in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'BlockstackSso' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Technical details[edit]

Please refer to the Github repo for technical details.

See also[edit]