fix(oauth): validate that redirect param exists.

Fixes #1786 

@zaach @ckarlof r?
That's a different code, the email verification code. I added another helper to validate OAuth codes.