

def serialize_settings(auth):
    user_addon = auth.user.get_addon('twofactor')
    result = {
        
    }
    if user_addon:
        result = user_addon.to_json(auth.user)
    else:
        result = {
            'is_enabled': False,
            'is_confirmed': False,
            'secret': None,
            'drift': None,
        }
    urls = serialize_urls(user_addon)
    result.update({
        'urls': urls,
    })
    return result

dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/twofactor/utils.py serialize_settings/original