Extension Email as Username


Extension Basics

Title
Email as Username
Name
ckanext-emailasusername
Type
Public extension
Description
CKAN extension allowing users to login and reset passwords with their email address as well as their username, with additional user registration validation.
CKAN versions
Download-Url (zip)
Last commit
3 years ago (2023-02-07 10:38:51)
Url to repo
Category
Authentication & Security


Background Infos

Description (long)
Show details

ckanext-emailasusername

Many users quickly forget their CKAN username or assume they should use their email to login. This CKAN extension allows users to login or reset their password with either their email address or their username. It doesn’t do away with the username but just offers the option to use email instead.

Features

  • Login with email address or username
  • Password reset with email address or username
  • Prevents duplicate email registrations
  • Optional auto-generation of username from email
  • Optional auto-population of username from full name
  • Optional double-entry email confirmation on registration
  • User search by email for sysadmins
  • Available on PyPI

Requirements

This extension is tested with CKAN 2.9 for Python 3 only.

Installation

To install ckanext-emailasusername:

  1. Activate your CKAN virtual environment:

    . /usr/lib/ckan/default/bin/activate
    
  2. Install the ckanext-emailasusername Python package:

    pip install ckanext-emailasusername
    
  3. Add emailasusername to the ckan.plugins setting in your CKAN config file.

  4. Configure CKAN to use the authenticator provided in this plugin. Add ckanext.emailasusername.authenticator:EmailAsUsernameAuthenticator to the [authenticators] plugins configuration in CKAN’s who.ini file:

    [authenticators]
    plugins =
       auth_tkt
       ckanext.emailasusername.authenticator:EmailAsUsernameAuthenticator
    
  5. Restart CKAN.

Configuration

# Allow searching users by email (sysadmins only for full search)
ckanext.emailasusername.search_by_username_and_email = True

# Auto-generate username from email (WARNING: reveals part of email)
ckanext.emailasusername.auto_generate_username_from_email = False

# Auto-populate username field from full name in registration form
ckanext.emailasusername.auto_generate_username_from_fullname = False

# Require double-entry of email on registration form
ckanext.emailasusername.require_user_email_input_confirmation = True

With Thanks

This extension has been built by Fjelltopp with funding from UNAIDS as part of the AIDS Data Repository project: https://adr.unaids.org

License

AGPL-3.0 license

Version
1.2.1
Version release date
2023-02-07
Contact name
Fjelltopp
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

Add ‘emailasusername’ to ckan.plugins. IMPORTANT: Must configure who.ini to add the EmailAsUsernameAuthenticator. Available on PyPI for easy installation.

Plugins to configure (ckan.ini)
emailasusername
CKAN Settings (ckan.ini)
ckanext.emailasusername.search_by_username_and_email = True
ckanext.emailasusername.auto_generate_username_from_email = False
ckanext.emailasusername.auto_generate_username_from_fullname = False
ckanext.emailasusername.require_user_email_input_confirmation = True
DB migration to be executed
(not set)
<< back to Extensions