5

I'm making an app (like single sign on) that:

  1. user request to login service A
  2. get username/password from db and login A by web_api of A
  3. make a HttpResponseRedirect, set cookie and return to user.

User <==> app <==> service(https)

The whole process is good in HTTP. but when service A is under HTTPS then it's not work. The cookie set in step 3 will disappear when user be redirected to A website.

response = HttpResponseRedirect('https://xxxx/service')
response.set_cookie(key=cookie.name, value=cookie.value, 
domain=cookie.domain, path=cookie.path, expires=cookie.expires)
julienc
  • 19,087
  • 17
  • 82
  • 82
Fish Lin
  • 51
  • 1
  • 4

0 Answers0