@partial.partial
def set_logged_in_cookies(backend=None, user=None, strategy=None, auth_entry=None, *args, **kwargs):
 if ((not is_api(auth_entry)) and (user is not None) and user.is_authenticated()):
  request = (strategy.request if strategy else None)
  if (request is not None):
   has_cookie = student.cookies.is_logged_in_cookie_set(request)
   if (not has_cookie):
    try:
     redirect_url = get_complete_url(backend.name)
    except ValueError:
     pass
    else:
     response = redirect(redirect_url)
     return student.cookies.set_logged_in_cookies(request, response, user)

@ partial . partial def set_logged_in_cookies ( backend = None , user = None , strategy = None , auth_entry = None , * args , ** kwargs ) : if ( ( not is_api ( auth_entry ) ) and ( user is not None ) and user . is_authenticated ( ) ) : request = ( strategy . request if strategy else None ) if ( request is not None ) : has_cookie = student . cookies . is_logged_in_cookie_set ( request ) if ( not has_cookie ) : try : redirect_url = get_complete_url ( backend . name ) except ValueError : pass else : response = redirect ( redirect_url ) return student . cookies . set_logged_in_cookies ( request , response , user )
this pipeline step sets the "logged in" cookie for authenticated users .