mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:06:08 -04:00
Password reset, finally.
This commit is contained in:
parent
117f35ac4a
commit
8db6832db8
3 changed files with 38 additions and 7 deletions
|
@ -195,12 +195,18 @@ class AuthHandler(BaseHandler):
|
|||
def _check_email_identity(self, authdict, _):
|
||||
yield run_on_reactor()
|
||||
|
||||
if 'threepidCreds' not in authdict:
|
||||
raise LoginError(400, "Missing threepidCreds", Codes.MISSING_PARAM)
|
||||
|
||||
threepidCreds = authdict['threepidCreds']
|
||||
identity_handler = self.hs.get_handlers().identity_handler
|
||||
|
||||
logger.debug("Getting validated threepid. threepidcreds: %r" % (threepidCreds,))
|
||||
logger.info("Getting validated threepid. threepidcreds: %r" % (threepidCreds,))
|
||||
threepid = yield identity_handler.threepid_from_creds(threepidCreds)
|
||||
|
||||
if not threepid:
|
||||
raise LoginError(401, "", errcode=Codes.UNAUTHORIZED)
|
||||
|
||||
threepid['threepidCreds'] = authdict['threepidCreds']
|
||||
|
||||
defer.returnValue(threepid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue