@must_be_logged_in
def delete_external_identity(auth, **kwargs):
 data = request.get_json()
 identity = data.get('identity')
 if (not identity):
  raise HTTPError(http.BAD_REQUEST)
 for service in auth.user.external_identity:
  if (identity in auth.user.external_identity[service]):
   auth.user.external_identity[service].pop(identity)
   if (len(auth.user.external_identity[service]) == 0):
    auth.user.external_identity.pop(service)
   auth.user.save()
   return
 raise HTTPError(http.NOT_FOUND, 'Unable to find requested identity')

@ must_be_logged_in def delete_external_identity ( auth , ** kwargs ) : data = request . get_json ( ) identity = data . get ( 'identity' ) if ( not identity ) : raise HTTPError ( http . BAD_REQUEST ) for service in auth . user . external_identity : if ( identity in auth . user . external_identity [ service ] ) : auth . user . external_identity [ service ] . pop ( identity ) if ( len ( auth . user . external_identity [ service ] ) == 0 ) : auth . user . external_identity . pop ( service ) auth . user . save ( ) return raise HTTPError ( http . NOT_FOUND , 'Unable to find requested identity' )
removes single external identity from user .