newleaders/thincloud-authentication — pull request #16 by elskwid (2013-01-25 02:54:25+00:00)
Title: Invalid auth issue

In some cases, where Users and Identities are
manually created, we will have these records in
the system without a valid UID. This presents a
problem with logging in as the #create method
of RegistrationsController ends up calling
`Identity.find_omniauth` which will find an
identity - which is invalid.

By checking for a missing uid we return a nil
from `find_omniauth` which allows the rest of
the logic to take over.

P.S. There are tests for this.