mykabam/kabam-kernel — pull request #54 by chopachom (2013-10-08 22:13:17+00:00)
Title: New signup flow

This is a big update and it include following features:

- user can create account using any oauth service we have (possibly we can limit this to whitelisted services)
- username, password and email are no more required for user.

The last statement can raise your eyebrow, but it actually makes sense:

- if user signs up using Google (open id) they would have email, but they won't have password or username (unless they want to add them by editing their profile). So we expect a user to use google login as the only login method unless they want to add other.
- same applies to other services
- in case if service doesn't return email then the user wouldn't have it, but still they would be able to log in using the service they registered with.

Instead of asking for username and email after using oauth services we now ask for the first and last names after regular signup, in case of oauth signups these fields are usually populated automatically.

What isn't done:
Email change. Changing emails would require validating new emails before actually changing them in the user profile. Same applies for an empty email after signup through service that didn't return emails, so if user has empty email and enters new email they should still have to verify it.

**WARNING**

This request makes breaking changes please review it as much is possible, it is kinda huge and I don't expect you reviewing every bit, but I want you to review logic in the oauth tests: https://github.com/chopachom/kabam-kernel/blob/67eff0871c2521370a5d6dc8a8b5f8a54634561d/test/oauth.test.js I could easily miss something

Lets discuss