Пример #1
0
def _create_reset_password_url(email, next_redirect):
    data = json.dumps({'email': email, 'created_at': str(datetime.utcnow())})
    static_url_part = '/new-password/'
    full_url = url_with_token(data, static_url_part, current_app.config)
    if next_redirect:
        full_url += '?{}'.format(urlencode({'next': next_redirect}))
    return full_url
Пример #2
0
def _create_2fa_url(user, secret_code, next_redir, email_auth_link_host):
    data = json.dumps({'user_id': str(user.id), 'secret_code': secret_code})
    url = '/email-auth/'
    ret = url_with_token(data, url, current_app.config, base_url=email_auth_link_host)
    if next_redir:
        ret += '?{}'.format(urlencode({'next': next_redir}))
    return ret
Пример #3
0
def _create_confirmation_url(user, email_address):
    data = json.dumps({'user_id': str(user.id), 'email': email_address})
    url = '/user-profile/email/confirm/'
    return url_with_token(data, url, current_app.config)
Пример #4
0
def _create_verification_url(user):
    data = json.dumps({'user_id': str(user.id), 'email': user.email_address})
    url = '/verify-email/'
    return url_with_token(data, url, current_app.config)
Пример #5
0
def _create_reset_password_url(email):
    data = json.dumps({'email': email, 'created_at': str(datetime.utcnow())})
    url = '/new-password/'
    return url_with_token(data, url, current_app.config)
Пример #6
0
def _create_confirmation_url(user, email_address):
    data = json.dumps({'user_id': str(user.id), 'email': email_address})
    url = '/user-profile/email/confirm/'
    return url_with_token(data, url, current_app.config)
Пример #7
0
def _create_verification_url(user, secret_code):
    data = json.dumps({'user_id': str(user.id), 'email': user.email_address, 'secret_code': secret_code})
    url = '/verify-email/'
    return url_with_token(data, url, current_app.config)
Пример #8
0
def _create_reset_password_url(email):
    data = json.dumps({'email': email, 'created_at': str(datetime.utcnow())})
    url = '/new-password/'
    return url_with_token(data, url, current_app.config)