def in_purchases_not_auth(request, recipe_id):
    """Check if a recipe is in purchases for an unauthorized user."""
    user_ip = request.META['REMOTE_ADDR']
    recipe_id = recipe_id
    if request.session.get(user_ip):
        if str(recipe_id) in list(set(request.session[user_ip])):
            return True
    return False