NoamB/sorcery — Issue #131: Oauth turns model validations to false when authenticating
Author: levberlin
Created: 2011-11-01 19:37:08+00:00
State: open

I found that signup using Oauth ignores model validations when creating a new user.

When using Oauth, turning model validations to false makes sense in some cases: for example, where the user model would normally validate email presence, but Oauth via Twitter obviously shouldn't require an email.

However, ignoring user validations wholesale probably isn't the most robust solution: for example, where login is accomplished via username instead of email, you may end up with duplicate usernames (Twitter username may be the same as an existing username, but validation was set to false and uniqueness was not tested).