User management in each new app is a pain. This is the last time you should be doing it
Python HTML CSS Shell Gherkin Mako Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
features Fix tests for Baseframe form changes Feb 24, 2018
instance Test fix and updated readme Oct 16, 2017
lastuser_core Fix for LinkedIn OAuth token length (currently ~500 chars, 1000 recom… Oct 17, 2017
lastuser_oauth Support email in Twitter login Aug 4, 2018
lastuser_ui Replace g.* with coaster's current_auth Jan 30, 2018
lastuserapp Replace g.* with coaster's current_auth Jan 30, 2018
migrations Fix for LinkedIn OAuth token length (currently ~500 chars, 1000 recom… Oct 17, 2017
tests Test fix and updated readme Oct 16, 2017
.coveragerc Add unit tests Apr 12, 2016
.gitignore Experimental automatic sign-in file Dec 6, 2017
.travis.yml Submit coverage to Coveralls. Jan 30, 2018
CHANGES.rst Refactoring complete. Now a multi-file app. May 18, 2011
LICENSE.txt Update LICENSE.txt Jan 22, 2016
MANIFEST.in Refactoring complete. Now a multi-file app. May 18, 2011
README.md Test fix and updated readme Oct 16, 2017
config.rb Reorganized code into multiple blueprints. Mar 19, 2013
manage.py Fix #204 (#205) May 4, 2017
requirements.txt Update pytz from 2018.4 to 2018.5 Jul 3, 2018
rq.sh Fix #204 (#205) May 4, 2017
rqinit.py Fix #204 (#205) May 4, 2017
runserver.py Fix #204 (#205) May 4, 2017
runtests.sh Switch to pytest Feb 24, 2018
runtestserver.py Fix #204 (#205) May 4, 2017
secrets.test.sample use string instead of list Mar 7, 2017
sitecustomize.py i18n and string type consistency Jan 23, 2015
test_requirements.txt Update selenium from 3.13.0 to 3.14.0 Aug 4, 2018
website.py Fix #204 (#205) May 4, 2017

README.md

Lastuser

Build status Coverage status

User management is a pain. Apps shouldn't have their own user management code if it can be centrally managed. Lastuser does it for HasGeek. This open source code release is intended to help you examine our code, work with our APIs, and lend a helping hand where needed.

Usage

Lastuser requires PostgreSQL and Python 2.7. A virtualenv is strongly recommended. Instructions:

$ git clone https://github.com/hasgeek/lastuser
$ cd lastuser
$ pip install -r requirements.txt
$ createdb lastuser
$ cp instance/settings-sample.py instance/development.py

Edit to customize instance/development.py as needed, then populate the database:

$ python manage.py createdb

You should now be able to run the development server, accessible at http://localhost:7000:

$ python runserver.py

To use Lastuser effectively, you will need to create an /etc/hosts entry pointing to localhost, for Lastuser and any client apps you may need:

127.0.0.1 lastuser.mymachine.local
127.0.0.1 clientapp.mymachine.local

Tests

Before you run the tests:

$ pip install -r test_requirements.txt
$ cp secrets.test.sample secrets.test

secrets.test contains API keys for various external services Lastuser works with. Note that Lastuser's functional tests are incomplete at this time.

Next, create a test database. Do not use your development database for this as the test database is wiped after each run of the test suite:

$ createdb lastuser_test_app

Run the tests from the root directory of the project:

$ ./runtests.sh

Support

Feel free to file a bug report for anything that doesn't work or is amiss in our code. We're available for a chat in #tech on friends.hasgeek.com.