@partial
def require_email(strategy, backend, details, user=None, is_new=False, **kwargs):
 if (backend.name == u'github'):
  email = get_github_email(kwargs[u'response'][u'access_token'])
  if (email is not None):
   details[u'email'] = email
 if (user and user.email):
  if (backend.name == u'email'):
   return {u'is_new': True}
  return
 elif (is_new and (not details.get(u'email'))):
  return redirect(u'register')

@ partial def require_email ( strategy , backend , details , user = None , is_new = False , ** kwargs ) : if ( backend . name == u'github' ) : email = get_github_email ( kwargs [ u'response' ] [ u'access_token' ] ) if ( email is not None ) : details [ u'email' ] = email if ( user and user . email ) : if ( backend . name == u'email' ) : return { u'is_new' : True } return elif ( is_new and ( not details . get ( u'email' ) ) ) : return redirect ( u'register' )
forces entering email for backends which dont provide it .