Merge pull request #4 from matrix-org/babolivier/complete_sso_login

Use complete_sso_login from Synapse instead of re-implementing it
master
Brendan Abolivier 5 years ago committed by GitHub
commit 956f84c42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -171,13 +171,6 @@ class SubmitResource(AsyncResource):
del username_mapping_sessions[session_id]
login_token = self._module_api.generate_short_term_login_token(
registered_user_id
)
redirect_url = _add_login_token_to_redirect_url(
session.client_redirect_url, login_token
)
# delete the cookie
request.addCookie(
SESSION_COOKIE_NAME,
@ -185,8 +178,12 @@ class SubmitResource(AsyncResource):
expires=b"Thu, 01 Jan 1970 00:00:00 GMT",
path=b"/",
)
request.redirect(redirect_url)
request.finish()
self._module_api.complete_sso_login(
registered_user_id,
request,
session.client_redirect_url,
)
class AvailabilityCheckResource(AsyncResource):

Loading…
Cancel
Save