Commit e2699175 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Fix google callback

include is mandatory.
parent 153e5452
......@@ -33,7 +33,13 @@ elif code is not None:
method = getattr(context, "ERP5Site_createGoogleUserToOAuth", None)
if method is not None:
method(user_reference, user_dict)
return context.REQUEST.RESPONSE.redirect(
context.REQUEST.get("came_from") or context.absolute_url())
return handleError('')
person_relative_url = context.ERP5Site_getPersonFromGoogleLogin(user_reference)
came_from = context.absolute_url() + "/#!login?" % person_relative_url
context.REQUEST.RESPONSE.setHeader('Location', came_from)
return handleError('')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment