JordanHatch/anthology — pull request #14 by JordanHatch (2014-08-06 07:08:00+00:00)
Title: Switch to using Google Auth

This swaps out the existing GitHub authentication for Google Auth.

We're doing this because everyone in GDS has a Google Apps account, but only a subset use GitHub - therefore this is opening the library up to more people.

By specifying the `PERMITTED_EMAIL_HOSTNAMES` environment variable, you can restrict the users who can sign in. (multiple hostnames can be specified as a comma-separated list)

The `User` model no longer has fields which are specific to a single provider, which makes it easier to implement your own authentication provider. I've also removed Warden here, implementing the session handling behaviour manually, as it's simpler.

There's no behaviour here to migrate users between auth providers. We're going to empty the user and loan tables, and coincide this change with an audit of all books currently out on loan.